MCPcopy
hub / github.com/valyala/fasthttp / stopTimer

Function stopTimer

timer.go:19–28  ·  view source on GitHub ↗
(t *time.Timer)

Source from the content-addressed store, hash-verified

17}
18
19func stopTimer(t *time.Timer) {
20 if !t.Stop() {
21 // Collect possibly added time from the channel
22 // if timer has been stopped and nobody collected its value.
23 select {
24 case <-t.C:
25 default:
26 }
27 }
28}
29
30// AcquireTimer returns a time.Timer from the pool and updates it to
31// send the current time on its channel after at least timeout.

Callers 3

TimeoutWithCodeHandlerFunction · 0.85
resetMethod · 0.85
ReleaseTimerFunction · 0.85

Calls 1

StopMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…