Skip to content

Commit

Permalink
metrics: NilResettingTimer.Time should execute the timed function (27…
Browse files Browse the repository at this point in the history
…724)
  • Loading branch information
omerfirmak authored and gzliudan committed Dec 9, 2024
1 parent 771c8ee commit 46a6c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/resetting_timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (NilResettingTimer) Values() []int64 { return nil }
func (NilResettingTimer) Snapshot() ResettingTimer { return NilResettingTimer{} }

// Time is a no-op.
func (NilResettingTimer) Time(func()) {}
func (NilResettingTimer) Time(f func()) { f() }

// Update is a no-op.
func (NilResettingTimer) Update(time.Duration) {}
Expand Down

0 comments on commit 46a6c10

Please sign in to comment.