Skip to content

Commit

Permalink
metrics: NilTimer should still run the function to be timed (ethereum…
Browse files Browse the repository at this point in the history
  • Loading branch information
omerfirmak authored and devopsbo3 committed Nov 10, 2023
1 parent da8b8ed commit 5ad2a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics/timer.go
Expand Up @@ -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) {}
Expand Down

0 comments on commit 5ad2a03

Please sign in to comment.