diff options
author | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:07 -0500 |
commit | 8465910c79b8e746e04fd581cca2d60399e569b9 (patch) | |
tree | f43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/llcommon/lltimer.cpp | |
parent | Second Life viewer sources 1.18.2.1 (diff) | |
download | meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.zip meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.gz meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.bz2 meta-impy-8465910c79b8e746e04fd581cca2d60399e569b9.tar.xz |
Second Life viewer sources 1.18.3.2-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/lltimer.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/linden/indra/llcommon/lltimer.cpp b/linden/indra/llcommon/lltimer.cpp index 6077063..177f1de 100644 --- a/linden/indra/llcommon/lltimer.cpp +++ b/linden/indra/llcommon/lltimer.cpp | |||
@@ -525,13 +525,27 @@ LLEventTimer::~LLEventTimer() | |||
525 | 525 | ||
526 | void LLEventTimer::updateClass() | 526 | void LLEventTimer::updateClass() |
527 | { | 527 | { |
528 | std::list<LLEventTimer*> completed_timers; | ||
528 | for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) | 529 | for (std::list<LLEventTimer*>::iterator iter = sActiveList.begin(); iter != sActiveList.end(); ) |
529 | { | 530 | { |
530 | LLEventTimer* timer = *iter++; | 531 | LLEventTimer* timer = *iter++; |
531 | F32 et = timer->mEventTimer.getElapsedTimeF32(); | 532 | F32 et = timer->mEventTimer.getElapsedTimeF32(); |
532 | if (et > timer->mPeriod) { | 533 | if (et > timer->mPeriod) { |
533 | timer->mEventTimer.reset(); | 534 | timer->mEventTimer.reset(); |
534 | timer->tick(); | 535 | if ( timer->tick() ) |
536 | { | ||
537 | completed_timers.push_back( timer ); | ||
538 | } | ||
539 | } | ||
540 | } | ||
541 | |||
542 | if ( completed_timers.size() > 0 ) | ||
543 | { | ||
544 | for (std::list<LLEventTimer*>::iterator completed_iter = completed_timers.begin(); | ||
545 | completed_iter != completed_timers.end(); | ||
546 | completed_iter++ ) | ||
547 | { | ||
548 | delete *completed_iter; | ||
535 | } | 549 | } |
536 | } | 550 | } |
537 | } | 551 | } |