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

Function initTimer

timer.go:8–17  ·  view source on GitHub ↗
(t *time.Timer, timeout time.Duration)

Source from the content-addressed store, hash-verified

6)
7
8func initTimer(t *time.Timer, timeout time.Duration) *time.Timer {
9 if t == nil {
10 return time.NewTimer(timeout)
11 }
12 if t.Reset(timeout) {
13 // developer sanity-check
14 panic("BUG: active timer trapped into initTimer()")
15 }
16 return t
17}
18
19func stopTimer(t *time.Timer) {
20 if !t.Stop() {

Callers 2

TimeoutWithCodeHandlerFunction · 0.85
AcquireTimerFunction · 0.85

Calls 1

ResetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…