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 MoonShiesty committed Aug 30, 2023
1 parent b9337b3 commit bddaf22
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 bddaf22

Please sign in to comment.