diff --git a/timer.go b/timer.go index 2f15c0c..b2a7f8b 100644 --- a/timer.go +++ b/timer.go @@ -17,6 +17,7 @@ type Timer struct { } func (this *Timer) init() { + this.timer = new(q5.XTimer) this.timer.Init( func (context interface{}) int64 { return q5.GetTickCount() @@ -32,6 +33,7 @@ func (this *Timer) update() { func (this *Timer) unInit() { this.timer.UnInit() + this.timer = nil } func (this *Timer) NewTimerAttacher() *TimerAttacher {