优化定时器

This commit is contained in:
boyce
2020-12-15 18:08:18 +08:00
parent 99d968bc67
commit c0cb20a5ef

View File

@@ -160,12 +160,10 @@ func (m *Module) GetParent()IModule{
}
func (m *Module) OnCloseTimer(timer *timer.Timer){
fmt.Printf("OnCloseTimer %p\n",timer)
delete(m.mapActiveTimer,timer)
}
func (m *Module) OnAddTimer(t *timer.Timer){
fmt.Printf("OnAddTimer %p\n",t)
if t != nil {
m.mapActiveTimer[t] = nil
}