comment change
[pstop.git] / p_s / relative_time.go
1 // manage the time the statistics were taken
2 package p_s
3
4 import (
5         "time"
6 )
7
8 // object to hold the last collection time
9 type InitialTime struct {
10         initial_time time.Time
11 }
12
13 // reflect we've just collected statistics
14 func (t *InitialTime) SetNow() {
15         t.initial_time = time.Now()
16 }
17
18 // return the last time we collected statistics
19 func (t InitialTime) Last() time.Time {
20         return t.initial_time
21 }