Versions in this module Expand all Collapse all v1 v1.0.1 Oct 14, 2022 v1.0.0 Jun 2, 2022 Changes in this version + var DefaultTimeWheel = NewTimeWheel(time.Second, 120) + func After(delay time.Duration) <-chan time.Time + func Remove(task *Task) error + func ResetDefaultTimeWheel(tw *TimeWheel) + func SetSyncPool(state bool) optionCall + func Sleep(delay time.Duration) + func TickSafeMode() optionCall + type Task struct + func Add(delay time.Duration, callback func()) *Task + func AddCron(delay time.Duration, callback func()) *Task + func (t *Task) Reset() + type Ticker struct + C chan bool + Ctx context.Context + func NewTicker(delay time.Duration) *Ticker + func (t *Ticker) Stop() + type TimeWheel struct + func NewTimeWheel(tick time.Duration, bucketsNum int, options ...optionCall) (*TimeWheel, error) + func (tw *TimeWheel) Add(delay time.Duration, callback func()) *Task + func (tw *TimeWheel) AddCron(delay time.Duration, callback func()) *Task + func (tw *TimeWheel) After(delay time.Duration) <-chan time.Time + func (tw *TimeWheel) AfterFunc(delay time.Duration, callback func()) *Timer + func (tw *TimeWheel) NewTicker(delay time.Duration) *Ticker + func (tw *TimeWheel) NewTimer(delay time.Duration) *Timer + func (tw *TimeWheel) Remove(task *Task) error + func (tw *TimeWheel) Sleep(delay time.Duration) + func (tw *TimeWheel) Start() + func (tw *TimeWheel) Stop() + type TimeWheelPool struct + func NewTimeWheelPool(size int, tick time.Duration, bucketsNum int, options ...optionCall) (*TimeWheelPool, error) + func (tp *TimeWheelPool) Get() *TimeWheel + func (tp *TimeWheelPool) GetRandom() *TimeWheel + func (tp *TimeWheelPool) Start() + func (tp *TimeWheelPool) Stop() + type Timer struct + C chan bool + Ctx context.Context + func AfterFunc(delay time.Duration, callback func()) *Timer + func NewTimer(delay time.Duration) *Timer + func (t *Timer) AddStopFunc(callback func()) + func (t *Timer) Reset(delay time.Duration) + func (t *Timer) Stop()