From 34d507215951fb3f4a5983b65e127577989a6db8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Irmak?= Date: Fri, 14 Jul 2023 20:19:03 +0300 Subject: [PATCH] metrics: NilResettingTimer.Time should execute the timed function (#27724) --- metrics/resetting_timer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics/resetting_timer.go b/metrics/resetting_timer.go index 924ba1105..8e23c8eee 100644 --- a/metrics/resetting_timer.go +++ b/metrics/resetting_timer.go @@ -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) {}