MCPcopy Index your code
hub / github.com/desertbit/timer / NewTimer

Function NewTimer

timer.go:28–32  ·  view source on GitHub ↗

NewTimer creates a new Timer that will send the current time on its channel after at least duration d.

(d time.Duration)

Source from the content-addressed store, hash-verified

26// NewTimer creates a new Timer that will send the current time on its
27// channel after at least duration d.
28func NewTimer(d time.Duration) *Timer {
29 t := NewStoppedTimer()
30 addTimer(t, d)
31 return t
32}
33
34// NewStoppedTimer creates a new stopped Timer.
35func NewStoppedTimer() *Timer {

Callers 15

TestNullTimoutFunction · 0.85
TestNegativeTimoutFunction · 0.85
TestTimeValueFunction · 0.85
TestSingleTimoutFunction · 0.85
TestMultipleTimoutsFunction · 0.85
TestStopFunction · 0.85
TestMultipleStopFunction · 0.85
TestResetFunction · 0.85
TestNegativeResetFunction · 0.85
TestMultipleResetsFunction · 0.85
TestMultipleZeroResetsFunction · 0.85

Calls 2

NewStoppedTimerFunction · 0.85
addTimerFunction · 0.85

Tested by 15

TestNullTimoutFunction · 0.68
TestNegativeTimoutFunction · 0.68
TestTimeValueFunction · 0.68
TestSingleTimoutFunction · 0.68
TestMultipleTimoutsFunction · 0.68
TestStopFunction · 0.68
TestMultipleStopFunction · 0.68
TestResetFunction · 0.68
TestNegativeResetFunction · 0.68
TestMultipleResetsFunction · 0.68
TestMultipleZeroResetsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…