This commit is contained in:
azw 2023-08-13 12:11:02 +08:00
parent 01f43ab4a0
commit 1db5053277

View File

@ -17,6 +17,7 @@ type Timer struct {
} }
func (this *Timer) init() { func (this *Timer) init() {
this.timer = new(q5.XTimer)
this.timer.Init( this.timer.Init(
func (context interface{}) int64 { func (context interface{}) int64 {
return q5.GetTickCount() return q5.GetTickCount()
@ -32,6 +33,7 @@ func (this *Timer) update() {
func (this *Timer) unInit() { func (this *Timer) unInit() {
this.timer.UnInit() this.timer.UnInit()
this.timer = nil
} }
func (this *Timer) NewTimerAttacher() *TimerAttacher { func (this *Timer) NewTimerAttacher() *TimerAttacher {