diff options
author | Richard Linden <none@none> | 2012-12-07 15:20:12 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-12-07 15:20:12 -0800 |
commit | c99886d94389babc78e92bbfa5084fdd785915af (patch) | |
tree | 839ffe3031ca296182743cf7af4d7375e2fb3c78 /indra/llcommon/lltimer.cpp | |
parent | 3745d1254acc386acaadd20016123c9a47b8d10c (diff) |
SH-3406 WIP convert fast timers to lltrace system
improved unit tests for LLUnit
renamed LLUnit to LLUnitImplicit with LLUnit being reserved for
explicit units
Diffstat (limited to 'indra/llcommon/lltimer.cpp')
-rw-r--r-- | indra/llcommon/lltimer.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 26063beff0..838155d54d 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -285,14 +285,14 @@ LLTimer::~LLTimer() } // static -LLUnit<LLUnits::Microseconds, U64> LLTimer::getTotalTime() +LLUnitImplicit<LLUnits::Microseconds, U64> LLTimer::getTotalTime() { // simply call into the implementation function. return totalTime(); } // static -LLUnit<LLUnits::Seconds, F64> LLTimer::getTotalSeconds() +LLUnitImplicit<LLUnits::Seconds, F64> LLTimer::getTotalSeconds() { return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64; } @@ -341,23 +341,23 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount) } -LLUnit<LLUnits::Seconds, F64> LLTimer::getElapsedTimeF64() const +LLUnitImplicit<LLUnits::Seconds, F64> LLTimer::getElapsedTimeF64() const { U64 last = mLastClockCount; return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv; } -LLUnit<LLUnits::Seconds, F32> LLTimer::getElapsedTimeF32() const +LLUnitImplicit<LLUnits::Seconds, F32> LLTimer::getElapsedTimeF32() const { return (F32)getElapsedTimeF64(); } -LLUnit<LLUnits::Seconds, F64> LLTimer::getElapsedTimeAndResetF64() +LLUnitImplicit<LLUnits::Seconds, F64> LLTimer::getElapsedTimeAndResetF64() { return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv; } -LLUnit<LLUnits::Seconds, F32> LLTimer::getElapsedTimeAndResetF32() +LLUnitImplicit<LLUnits::Seconds, F32> LLTimer::getElapsedTimeAndResetF32() { return (F32)getElapsedTimeAndResetF64(); } @@ -370,7 +370,7 @@ void LLTimer::setTimerExpirySec(F32 expiration) + (U64)((F32)(expiration * gClockFrequency)); } -LLUnit<LLUnits::Seconds, F32> LLTimer::getRemainingTimeF32() const +LLUnitImplicit<LLUnits::Seconds, F32> LLTimer::getRemainingTimeF32() const { U64 cur_ticks = get_clock_count(); if (cur_ticks > mExpirationTicks) |