Record the duration of an event that started at a time and ends now.
(ts time.Time)
| 134 | |
| 135 | // Record the duration of an event that started at a time and ends now. |
| 136 | func (t *StandardResettingTimer) UpdateSince(ts time.Time) { |
| 137 | t.mutex.Lock() |
| 138 | defer t.mutex.Unlock() |
| 139 | t.values = append(t.values, int64(time.Since(ts))) |
| 140 | } |
| 141 | |
| 142 | // ResettingTimerSnapshot is a point-in-time copy of another ResettingTimer. |
| 143 | type ResettingTimerSnapshot struct { |