Versions in this module Expand all Collapse all v1 v1.0.1 Apr 15, 2024 v1.0.0 Oct 17, 2023 Changes in this version + var ErrInvalidParam = errors.New("asynctimer: param is invalid") + var ErrShortDelay = errors.New("asynctimer: delay time is too short") + func Add(timer *Timer) error + func Del(timer *Timer) + func Stop() + type Callback func(data interface{}) + type TimeWheel struct + func NewTimeWheel(interval time.Duration, slotNum int) (*TimeWheel, error) + func (t *TimeWheel) Add(timer *Timer) error + func (t *TimeWheel) Del(timer *Timer) + func (t *TimeWheel) Start() + func (t *TimeWheel) Stop() + type Timer struct + func NewTimer(data interface{}, expiredHandle Callback, timeout time.Duration) *Timer