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