Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timer ¶
The Timer type represents a single event. When the Timer expires, the current time will be sent on C, unless the Timer was created by AfterFunc. A Timer must be created with NewTimer or AfterFunc.
func AfterFunc ¶
AfterFunc waits after calling its Start method for the duration to elapse and then calls f in its own goroutine. It returns a Timer that can be used to cancel the call using its Stop method, or pause using its Pause method
func NewTimer ¶
NewTimer creates a new Timer. It returns a Timer that can be used to cancel the call using its Stop method, or pause using its Pause method
func (*Timer) Pause ¶
Pause pauses current timer until Start method will be called. Next Start call will wait rest of duration.
func (*Timer) Paused ¶
Paused returns true if the timer is in idle state, either because Start() hasn't been called yet or because Pause() was called.
func (*Timer) SetTimeLeft ¶
SetTimeLeft adjusts the point in time the timer will fire to duration d from now. It returns false if the timer already expired, true otherwise.
func (*Timer) Start ¶
Start starts Timer that will send the current time on its channel after at least duration d.