Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTimeWheel ¶ added in v1.8.0
func SetTimeWheel(t *TimeWheel)
Types ¶
type Task ¶ added in v1.8.0
type Task struct {
// contains filtered or unexported fields
}
Task 延时任务
type TimeWheel ¶ added in v1.8.0
type TimeWheel struct {
// contains filtered or unexported fields
}
TimeWheel 时间轮
func GetTimeWheel ¶ added in v1.8.0
func GetTimeWheel() *TimeWheel
func (*TimeWheel) AddTimerCustom ¶ added in v1.8.0
可以通过key来撤销一个未执行的定时器
func (*TimeWheel) RemoveTimer ¶ added in v1.8.0
func (tw *TimeWheel) RemoveTimer(key interface{})
RemoveTimer 删除定时器 key为添加定时器时传递的定时器唯一标识
Click to show internal directories.
Click to hide internal directories.