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

This commit is contained in:
Ömer Faruk Irmak authored and GitHub committed 2023-07-14 19:19:03 +02:00
1 parent 47b9f1b4ae
commit 34d5072159
1 file changed
+1 -1
+1 -1
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) {}