From 04e4d646ea2b779e098cd3546fdf56620b4f74a6 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 10 Feb 2007 15:02:06 +0000 Subject: [PATCH] Remove dup code by calling TickTimers in a loop git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6560 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/timer.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/timer.cpp b/src/timer.cpp index ab0e9456c..63c7b5874 100644 --- a/src/timer.cpp +++ b/src/timer.cpp @@ -104,36 +104,8 @@ void TimerManager::DelTimer(InspTimer* T) */ void TimerManager::TickMissedTimers(time_t TIME) { - /** See comment above in TickTimers - */ - this->CantDeleteHere = true; - for (time_t n = TIME-1; n > TIME-120; n--) - { - timerlist::iterator found = Timers.find(n); - if (found != Timers.end()) - { - timergroup* x = found->second; - for (timergroup::iterator y = x->begin(); y != x->end(); y++) - { - InspTimer* z = *y; - z->Tick(TIME); - if (z->GetRepeat()) - { - AddTimer(z, z->GetSecs()); - } - else - { - DELETE(z); - } - } - - Timers.erase(found); - DELETE(x); - } - } - - this->CantDeleteHere = false; + this->TickTimers(TIME); } void TimerManager::AddTimer(InspTimer* T, long secs_from_now) -- 2.39.5