summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltimer.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-02-08 12:27:33 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-02-08 12:27:33 +0000
commit7660c19ce8fed013eea06450fe6deb4ae92f3ead (patch)
treea6b454d6b93a1b8befc1467a4f3570f5fa89a1af /indra/llcommon/lltimer.cpp
parent62f0f426532808755f6d97f34fd2d8c9e5d2fa6a (diff)
parent4e28c10971dc4f9a52a7b3f109143dbce3528d21 (diff)
Merge from viewer2 trunk.
Diffstat (limited to 'indra/llcommon/lltimer.cpp')
-rw-r--r--indra/llcommon/lltimer.cpp57
1 files changed, 0 insertions, 57 deletions
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 21e165ebc9..25b768079b 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -555,60 +555,3 @@ void secondsToTimecodeString(F32 current_time, std::string& tcstring)
}
-//////////////////////////////////////////////////////////////////////////////
-//
-// LLEventTimer Implementation
-//
-//////////////////////////////////////////////////////////////////////////////
-
-LLEventTimer::LLEventTimer(F32 period)
-: mEventTimer()
-{
- mPeriod = period;
- mBusy = false;
-}
-
-LLEventTimer::LLEventTimer(const LLDate& time)
-: mEventTimer()
-{
- mPeriod = (F32)(time.secondsSinceEpoch() - LLDate::now().secondsSinceEpoch());
- mBusy = false;
-}
-
-
-LLEventTimer::~LLEventTimer()
-{
- llassert(!mBusy); // this LLEventTimer was destroyed from within its own tick() function - bad. if you want tick() to cause destruction of its own timer, make it return true.
-}
-
-//static
-void LLEventTimer::updateClass()
-{
- std::list<LLEventTimer*> completed_timers;
- for (instance_iter iter = beginInstances(); iter != endInstances(); )
- {
- LLEventTimer& timer = *iter++;
- F32 et = timer.mEventTimer.getElapsedTimeF32();
- if (timer.mEventTimer.getStarted() && et > timer.mPeriod) {
- timer.mEventTimer.reset();
- timer.mBusy = true;
- if ( timer.tick() )
- {
- completed_timers.push_back( &timer );
- }
- timer.mBusy = false;
- }
- }
-
- 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;
- }
- }
-}
-
-