Lines Matching refs:Timer
15 // Must be in sync with ../runtime/runtime.h:/^struct.Timer$
43 // The Timer type represents a single event.
44 // When the Timer expires, the current time will be sent on C,
45 // unless the Timer was created by AfterFunc.
46 // A Timer must be created with NewTimer or AfterFunc.
47 type Timer struct {
52 // Stop prevents the Timer from firing.
53 // It returns true if the call stops the timer, false if the timer has already
57 func (t *Timer) Stop() bool {
59 panic("time: Stop called on uninitialized Timer")
64 // NewTimer creates a new Timer that will send
66 func NewTimer(d Duration) *Timer {
68 t := &Timer{
80 // Reset changes the timer to expire after duration d.
81 // It returns true if the timer had been active, false if the timer had
83 func (t *Timer) Reset(d Duration) bool {
85 panic("time: Reset called on uninitialized Timer")
114 // in its own goroutine. It returns a Timer that can
116 func AfterFunc(d Duration, f func()) *Timer {
117 t := &Timer{