forked from cerc-io/plugeth
metrics: return an empty snapshot for NilResettingTimer (#16930)
This commit is contained in:
parent
13af276418
commit
7f0726f706
@ -58,7 +58,11 @@ type NilResettingTimer struct {
|
||||
func (NilResettingTimer) Values() []int64 { return nil }
|
||||
|
||||
// Snapshot is a no-op.
|
||||
func (NilResettingTimer) Snapshot() ResettingTimer { return NilResettingTimer{} }
|
||||
func (NilResettingTimer) Snapshot() ResettingTimer {
|
||||
return &ResettingTimerSnapshot{
|
||||
values: []int64{},
|
||||
}
|
||||
}
|
||||
|
||||
// Time is a no-op.
|
||||
func (NilResettingTimer) Time(func()) {}
|
||||
|
Loading…
Reference in New Issue
Block a user