Record the duration of an event, in nanoseconds.
(d time.Duration)
| 227 | |
| 228 | // Record the duration of an event, in nanoseconds. |
| 229 | func (t *StandardTimer) Update(d time.Duration) { |
| 230 | t.mutex.Lock() |
| 231 | defer t.mutex.Unlock() |
| 232 | t.histogram.Update(d.Nanoseconds()) |
| 233 | t.meter.Mark(1) |
| 234 | } |
| 235 | |
| 236 | // Record the duration of an event that started at a time and ends now. |
| 237 | // The record uses nanoseconds. |