From 1db5053277eab004bd09af83ddbe1569e9492b53 Mon Sep 17 00:00:00 2001 From: azw Date: Sun, 13 Aug 2023 12:11:02 +0800 Subject: [PATCH] 1 --- timer.go | 2 ++ 1 file changed, 2 insertions(+) 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 {