aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/lltimer.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:07 -0500
committerJacek Antonelli2008-08-15 23:45:07 -0500
commit8465910c79b8e746e04fd581cca2d60399e569b9 (patch)
treef43fec3e83c46e0d6190dca923d6fb268b52ffdd /linden/indra/llcommon/lltimer.cpp
parentSecond Life viewer sources 1.18.2.1 (diff)
downloadmeta-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.cpp16
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
526void LLEventTimer::updateClass() 526void 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}