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

This commit is contained in:
Ömer Faruk Irmak 2024-05-03 16:14:37 +03:00 committed by GitHub
parent c3b7678ccc
commit da3be71ba8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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