Documentation
¶
Index ¶
- 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 Start()
- func Stop()
- type Pool
- type Task
- type Ticker
- type TimeWheel
- 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 Timer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetDefaultTimeWheel ¶
func ResetDefaultTimeWheel(tw *TimeWheel)
func SetSyncPool ¶
func SetSyncPool(state bool) optionCall
Types ¶
type TimeWheel ¶
type TimeWheel struct {
// contains filtered or unexported fields
}
func NewTimeWheel ¶
NewTimeWheel create new time wheel
type Timer ¶
Timer similar to golang std timer
func (*Timer) AddStopFunc ¶
func (t *Timer) AddStopFunc(callback func())
Click to show internal directories.
Click to hide internal directories.