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

Method Update

metrics/timer.go:229–234  ·  view source on GitHub ↗

Record the duration of an event, in nanoseconds.

(d time.Duration)

Source from the content-addressed store, hash-verified

227
228// Record the duration of an event, in nanoseconds.
229func (t *StandardTimer) Update(d time.Duration) {
230 t.mutex.Lock()
231 defer t.mutex.Unlock()
232 t.histogram.Update(d.Nanoseconds())
233 t.meter.Mark(1)
234}
235
236// Record the duration of an event that started at a time and ends now.
237// The record uses nanoseconds.

Callers 2

TimeMethod · 0.95
UpdateSinceMethod · 0.95

Calls 4

LockMethod · 0.80
UpdateMethod · 0.65
MarkMethod · 0.65
UnlockMethod · 0.45

Tested by

no test coverage detected