新增Ticker定時器

This commit is contained in:
boyce
2020-11-01 00:21:07 +08:00
parent d2f52b382d
commit 59c9d20071
4 changed files with 197 additions and 114 deletions

View File

@@ -307,6 +307,9 @@ func (t *timeWheel) addTimer(timer *Timer) *Timer {
//删除定时器
func (t *timeWheel) delTimer(timer *Timer) {
if timer.next == nil {
return
}
timer.prev.next = timer.next
timer.next.prev = timer.prev
ReleaseTimer(timer)