MCPcopy Index your code
hub / github.com/cortexproject/cortex / ResetTimer

Function ResetTimer

pkg/util/timer/timer.go:20–23  ·  view source on GitHub ↗

ResetTimer safely resets timer, handling the required stop+drain sequence first.

(timer *time.Timer, d time.Duration)

Source from the content-addressed store, hash-verified

18
19// ResetTimer safely resets timer, handling the required stop+drain sequence first.
20func ResetTimer(timer *time.Timer, d time.Duration) {
21 StopAndDrainTimer(timer)
22 timer.Reset(d)
23}

Callers 3

TestResetTimerFunction · 0.85

Calls 2

StopAndDrainTimerFunction · 0.85
ResetMethod · 0.45

Tested by 3

TestResetTimerFunction · 0.68