Documentation ¶
Index ¶
- Constants
- func NewTimer(ctx any, hand TimerHandler, dur time.Duration, repeat int) *timer
- func NewTimerWithFirstDo(ctx any, hand TimerHandler, firstFireAt time.Time, dur time.Duration, ...) *timer
- func ResetNowTime(nowTime time.Time)
- type Timer
- type TimerChannel
- type TimerHandler
- type TimerMsg
- type TimerTriggerMode
Constants ¶
View Source
const ( TriggerModeMore = 0 TriggerModeOnce = 1 )
Variables ¶
This section is empty.
Functions ¶
func NewTimerWithFirstDo ¶
func ResetNowTime ¶
Types ¶
type TimerChannel ¶
type TimerChannel struct {
C chan TimerMsg
}
func (*TimerChannel) OnTime ¶
func (t *TimerChannel) OnTime(msg TimerMsg)
type TimerHandler ¶
type TimerHandler interface {
OnTime(msg TimerMsg)
}
type TimerTriggerMode ¶
type TimerTriggerMode = int
Click to show internal directories.
Click to hide internal directories.