Skip to content

Commit

Permalink
metrics: NilResettingTimer.Time should execute the timed function (et…
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 13, 2024
1 parent 51e49a8 commit d43f6c0
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 d43f6c0

Please sign in to comment.