Versions in this module Expand all Collapse all v1 v1.3.0 Aug 23, 2021 Changes in this version + const HourInterval + const HourName + const HourScales + const MaxChanBuff + const MaxTimeDelay + const MinuteInterval + const MinuteName + const MinuteScales + const SecondInterval + const SecondName + const SecondScales + const TimersMaxCap + func UnixMilli() int64 + type DelayFunc struct + func NewDelayFunc(f func(v ...interface{}), args []interface{}) *DelayFunc + func (df *DelayFunc) Call() + func (df *DelayFunc) String() string + type TimeWheel struct + func NewTimeWheel(name string, interval int64, scales int, maxCap int) *TimeWheel + func (tw *TimeWheel) AddTimeWheel(next *TimeWheel) + func (tw *TimeWheel) AddTimer(tID uint32, t *Timer) error + func (tw *TimeWheel) GetTimerWithIn(duration time.Duration) map[uint32]*Timer + func (tw *TimeWheel) RemoveTimer(tID uint32) + func (tw *TimeWheel) Run() + type Timer struct + func NewTimerAfter(df *DelayFunc, duration time.Duration) *Timer + func NewTimerAt(df *DelayFunc, unixNano int64) *Timer + func (t *Timer) Run() + type TimerScheduler struct + IDGen uint32 + IDs []uint32 + func NewAutoExecTimerScheduler() *TimerScheduler + func NewTimerScheduler() *TimerScheduler + func (ts *TimerScheduler) CancelTimer(tID uint32) + func (ts *TimerScheduler) CreateTimerAfter(df *DelayFunc, duration time.Duration) (uint32, error) + func (ts *TimerScheduler) CreateTimerAt(df *DelayFunc, unixNano int64) (uint32, error) + func (ts *TimerScheduler) GetTriggerChan() chan *DelayFunc + func (ts *TimerScheduler) HasTimer(tID uint32) bool + func (ts *TimerScheduler) Start()