From 70271a1b60abea42e643a8b54ca73a4d1e4a044b Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Mon, 30 Nov 2020 17:59:36 +0800 Subject: [PATCH] 1 --- timer.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/timer.go b/timer.go index 2efb277..bb2e267 100644 --- a/timer.go +++ b/timer.go @@ -133,6 +133,12 @@ func (this *Timer) AddDeadLineTimer( return this.AddDeadLineTimerEx(milli_seconds, init_func, timer_func, nil) } +func (this *Timer) AddSimpleDeadLineTimer( + milli_seconds int32, + timer_func func (params* XParams)) *TimerList { + return this.AddDeadLineTimer(milli_seconds, nil, timer_func); +} + func (this *Timer) AddDeadLineTimerEx( milli_seconds int32, init_func func (params* XParams), @@ -158,6 +164,12 @@ func (this *Timer) AddRepeatTimer( return this.AddRepeatTimerEx(milli_seconds, init_func, timer_func, nil) } +func (this *Timer) AddSimpleRepeatTimer( + milli_seconds int32, + timer_func func (params* XParams)) *TimerList { + return this.AddRepeatTimer(milli_seconds, nil, timer_func) +} + func (this *Timer) AddRepeatTimerEx( milli_seconds int32, init_func func (params* XParams), @@ -182,6 +194,12 @@ func (this *Timer) AddFixedTimer( return this.AddFixedTimerEx(milli_seconds, init_func, timer_func, nil) } +func (this *Timer) AddSimpleFixedTimer( + milli_seconds int32, + timer_func func (params* XParams)) *TimerList { + return this.AddFixedTimer(milli_seconds, nil, timer_func) +} + func (this *Timer) AddFixedTimerEx( milli_seconds int32, init_func func (params* XParams),