mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-03 22:45:13 +08:00
优化定时器
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user