git://git.iain.cx/iain
/
pstop.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more cleanups
[pstop.git]
/
p_s
/
relative_time.go
diff --git
a/p_s/relative_time.go
b/p_s/relative_time.go
index
2339d28
..
2cf742b
100644
(file)
--- a/
p_s/relative_time.go
+++ b/
p_s/relative_time.go
@@
-1,17
+1,21
@@
+// manage the time the statistics were taken
package p_s
import (
"time"
)
package p_s
import (
"time"
)
+// object to hold the last collection time
type InitialTime struct {
initial_time time.Time
}
type InitialTime struct {
initial_time time.Time
}
+// reflect we've just collected statistics
func (t *InitialTime) SetNow() {
t.initial_time = time.Now()
}
func (t *InitialTime) SetNow() {
t.initial_time = time.Now()
}
+// return the last time we collected statistics
func (t InitialTime) Last() time.Time {
return t.initial_time
}
func (t InitialTime) Last() time.Time {
return t.initial_time
}