mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-24 14:44:42 +08:00
优化定时器
This commit is contained in:
@@ -160,12 +160,10 @@ func (m *Module) GetParent()IModule{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) OnCloseTimer(timer *timer.Timer){
|
func (m *Module) OnCloseTimer(timer *timer.Timer){
|
||||||
fmt.Printf("OnCloseTimer %p\n",timer)
|
|
||||||
delete(m.mapActiveTimer,timer)
|
delete(m.mapActiveTimer,timer)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Module) OnAddTimer(t *timer.Timer){
|
func (m *Module) OnAddTimer(t *timer.Timer){
|
||||||
fmt.Printf("OnAddTimer %p\n",t)
|
|
||||||
if t != nil {
|
if t != nil {
|
||||||
m.mapActiveTimer[t] = nil
|
m.mapActiveTimer[t] = nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user