diff options
author | Christian Goetze <cg@lindenlab.com> | 2007-08-21 22:17:53 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2007-08-21 22:17:53 +0000 |
commit | ce0a5fe14590b8d675b885fccd5f79d7ea17a302 (patch) | |
tree | 3388e6f8ff02292ec4521d278c841801462945b8 /indra/llcommon/lltimer.cpp | |
parent | b699ae454d8477d19342d320758cd993d1d28cec (diff) |
EFFECTIVE MERGE: svn merge -r 66133:68118 svn+ssh://svn/svn/linden/branches/maintenance into release
Actual action: branched maintenance-r68118, merged in release, then copied result into release
Diffstat (limited to 'indra/llcommon/lltimer.cpp')
-rw-r--r-- | indra/llcommon/lltimer.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index f335458f24..73e73b9c44 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -505,13 +505,27 @@ LLEventTimer::~LLEventTimer() void LLEventTimer::updateClass() { + std::list<LLEventTimer*> completed_timers; for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) { LLEventTimer* timer = *iter++; F32 et = timer->mEventTimer.getElapsedTimeF32(); if (et > timer->mPeriod) { timer->mEventTimer.reset(); - timer->tick(); + if ( timer->tick() ) + { + completed_timers.push_back( timer ); + } + } + } + + if ( completed_timers.size() > 0 ) + { + for (std::list<LLEventTimer*>::iterator completed_iter = completed_timers.begin(); + completed_iter != completed_timers.end(); + completed_iter++ ) + { + delete *completed_iter; } } } |