Documentation
¶
Index ¶
Constants ¶
View Source
const (
MIN_TIMER_INTERVAL = 1 * time.Millisecond
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Timer ¶
type Timer struct {
// contains filtered or unexported fields
}
func (*Timer) AddCallback ¶
func (t *Timer) AddCallback(d time.Duration, callback CallbackFunc) *timer
Add a callback which will be called after specified duration
func (*Timer) AddTimer ¶
func (t *Timer) AddTimer(d time.Duration, callback TimerCallbackFunc) *timer
Add a timer which calls callback periodly
func (*Timer) StartTicks ¶
Start the self-ticking routine, which ticks per tickInterval
type TimerCallbackFunc ¶
type TimerCallbackFunc func() bool
TimerCallbackFunc Type of callback function, return false represent stop this timer
Click to show internal directories.
Click to hide internal directories.