diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-10 15:02:06 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-02-10 15:02:06 +0000 |
commit | 04e4d646ea2b779e098cd3546fdf56620b4f74a6 (patch) | |
tree | 9fd9ee73c0a9c401149ffad6a7d4be4860d9333d | |
parent | 6cace9502f5a7e9cb9e924e1ef3483021c6a4e28 (diff) |
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
-rw-r--r-- | src/timer.cpp | 30 |
1 files changed, 1 insertions, 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) |