MCPcopy
hub / github.com/bnb-chain/bsc / UpdateSince

Method UpdateSince

metrics/resetting_timer.go:136–140  ·  view source on GitHub ↗

Record the duration of an event that started at a time and ends now.

(ts time.Time)

Source from the content-addressed store, hash-verified

134
135// Record the duration of an event that started at a time and ends now.
136func (t *StandardResettingTimer) UpdateSince(ts time.Time) {
137 t.mutex.Lock()
138 defer t.mutex.Unlock()
139 t.values = append(t.values, int64(time.Since(ts)))
140}
141
142// ResettingTimerSnapshot is a point-in-time copy of another ResettingTimer.
143type ResettingTimerSnapshot struct {

Callers

nothing calls this directly

Calls 2

LockMethod · 0.80
UnlockMethod · 0.45

Tested by

no test coverage detected