From 596953cf8ed17df2af2e2986dfe45507c6395a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B7=E5=8B=87?= Date: Wed, 25 Oct 2023 15:47:06 +0800 Subject: [PATCH] save --- timer.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/timer.go b/timer.go index 38f06fd..e27c866 100644 --- a/timer.go +++ b/timer.go @@ -19,11 +19,11 @@ type timer struct { func (this *timer) init() { this.base = new(q5.XTimer) this.base.Init( - func (context interface{}) int64 { + func(context interface{}) int64 { return q5.GetTickCount() }, nil, - 1000 * 60, + 1000*60, 5000) } @@ -90,10 +90,14 @@ func (this *timer) ModifyTimer(timerWp *TimerWp, expireTime int32) { this.base.ModifyTimer(timerWp.XTimerWp, expireTime) } -func (this *timer) Delete(timerWp *TimerWp) { +func (this *timer) Delete(timerWp *TimerWp) { this.base.Delete(timerWp.XTimerWp) } func (this *timer) GetRemainTime(timerWp *TimerWp) int64 { return this.base.GetRemainTime(timerWp.XTimerWp) } + +func (this *timer) DeleteRunningTimer() { + this.base.DeleteRunningTimer() +}