diff options
Diffstat (limited to 'metrics/resetting_timer.go')
-rw-r--r-- | metrics/resetting_timer.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/metrics/resetting_timer.go b/metrics/resetting_timer.go index f33a9f8aa..e5327d3bd 100644 --- a/metrics/resetting_timer.go +++ b/metrics/resetting_timer.go @@ -58,7 +58,11 @@ type NilResettingTimer struct { func (NilResettingTimer) Values() []int64 { return nil } // Snapshot is a no-op. -func (NilResettingTimer) Snapshot() ResettingTimer { return NilResettingTimer{} } +func (NilResettingTimer) Snapshot() ResettingTimer { + return &ResettingTimerSnapshot{ + values: []int64{}, + } +} // Time is a no-op. func (NilResettingTimer) Time(func()) {} |