diff --git a/pkg/metrics/stats/timings.go b/pkg/metrics/stats/timings.go index 799ed5db..105099f3 100644 --- a/pkg/metrics/stats/timings.go +++ b/pkg/metrics/stats/timings.go @@ -95,7 +95,7 @@ func (t *Timings) Add(name string, elapsed time.Duration) { // Record is a convenience function that records completion // timing data based on the provided start time of an event. func (t *Timings) Record(name string, startTime time.Time) { - t.Add(name, time.Now().Sub(startTime)) + t.Add(name, time.Since(startTime)) } // String is for expvar.