metrics: NilResettingTimer.Time should execute the timed function (#27724)

This commit is contained in:
Ömer Faruk Irmak 2023-07-14 20:19:03 +03:00 committed by GitHub
parent 47b9f1b4ae
commit 34d5072159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {}