Skip to content

Commit

Permalink
metrics: NilResettingTimer.Time should execute the timed function (#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak committed Jul 14, 2023
1 parent 47b9f1b commit 34d5072
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/resetting_timer.go
Expand Up @@ -66,7 +66,7 @@ func (NilResettingTimer) Snapshot() ResettingTimer {
}

// 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 34d5072

Please sign in to comment.