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
omerfirmak authored and devopsbo3 committed Nov 10, 2023
1 parent 098c798 commit 041d64c
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 041d64c

Please sign in to comment.