metrics: NilTimer should still run the function to be timed (#27723)

pull/27724/head
Ömer Faruk Irmak 1 year ago committed by GitHub
parent 60ecf48dd4
commit 13c0305106
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      metrics/timer.go

@ -123,7 +123,7 @@ func (NilTimer) Stop() {}
func (NilTimer) Sum() int64 { return 0 }
// Time is a no-op.
func (NilTimer) Time(func()) {}
func (NilTimer) Time(f func()) { f() }
// Update is a no-op.
func (NilTimer) Update(time.Duration) {}

Loading…
Cancel
Save