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.cpp36
1 files changed, 8 insertions, 28 deletions
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 2e00b2c382..2041d86fc6 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()
+bool LLToastLifeTimer::tick()
{
- if (mEventTimer.hasExpired())
- {
- mToast->expire();
- }
- return FALSE;
-}
-
-void LLToastLifeTimer::stop()
-{
- mEventTimer.stop();
-}
-
-void LLToastLifeTimer::start()
-{
- 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 isRunning();
}
void LLToastLifeTimer::setPeriod(F32 period)
@@ -78,13 +65,6 @@ 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()
: can_fade("can_fade", true),
@@ -337,7 +317,7 @@ void LLToast::setFading(bool transparent)
F32 LLToast::getTimeLeftToLive()
{
- F32 time_to_live = mTimer->getRemainingTimeF32();
+ F32 time_to_live = mTimer->getRemaining();
if (!mIsFading)
{