This commit is contained in:
aozhiwei 2023-02-14 15:55:10 +08:00
parent 58dd5bb850
commit 0ea88842f5
2 changed files with 9 additions and 0 deletions

View File

@ -524,6 +524,14 @@ namespace a8
impl_->InternalModifyTime(timer_wp.lock()->timer, expire_time);
}
void XTimer::ResetTimer(XTimerWp& timer_wp)
{
if (timer_wp.expired()) {
abort();
}
impl_->InternalModifyTime(timer_wp.lock()->timer, timer_wp.lock()->timer->expire_time);
}
void XTimer::Delete(XTimerWp& timer_wp)
{
if (timer_wp.expired()) {

View File

@ -27,6 +27,7 @@ namespace a8
void FireEvent(XTimerWp& timer_wp, int event, a8::Args* args);
void ModifyTime(XTimerWp& timer_wp, int expire_time);
void ResetTimer(XTimerWp& timer_wp);
void Delete(XTimerWp& timer_wp);
long long GetRemainTime(XTimerWp& timer_wp);
void DeleteCurrentTimer();