summaryrefslogtreecommitdiff
path: root/indra/newview/lltoast.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltoast.cpp')
-rw-r--r--indra/newview/lltoast.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 223aaad811..d30e028d33 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -43,34 +43,21 @@ LLToastLifeTimer::LLToastLifeTimer(LLToast* toast, F32 period)
{
}
-/*virtual*/
-BOOL LLToastLifeTimer::tick()
-{
- if (mEventTimer.hasExpired())
- {
- mToast->expire();
- }
- return FALSE;
-}
-
-void LLToastLifeTimer::stop()
-{
- mEventTimer.stop();
-}
-
-void LLToastLifeTimer::start()
+bool LLToastLifeTimer::tick()
{
- mEventTimer.start();
+ mToast->expire();
+ return false;
}
void LLToastLifeTimer::restart()
{
- mEventTimer.reset();
+ // start() discards any previously-running mTimer
+ start();
}
-BOOL LLToastLifeTimer::getStarted()
+bool LLToastLifeTimer::getStarted()
{
- return mEventTimer.getStarted();
+ return LLLater::instance.isRunning(mTimer);
}
void LLToastLifeTimer::setPeriod(F32 period)
@@ -78,12 +65,14 @@ void LLToastLifeTimer::setPeriod(F32 period)
mPeriod = period;
}
+/*==========================================================================*|
F32 LLToastLifeTimer::getRemainingTimeF32()
{
F32 et = mEventTimer.getElapsedTimeF32();
if (!getStarted() || et > mPeriod) return 0.0f;
return mPeriod - et;
}
+|*==========================================================================*/
//--------------------------------------------------------------------------
LLToast::Params::Params()