From 0bb0bd514b235948c1a21c81ab0e8ab6223b1990 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 8 Nov 2012 23:42:18 -0800 Subject: SH-3499 WIP Ensure asset stats output is correct Finished making LLUnit implicitly convertible to/from scalar integer values cleaned up test code --- indra/llcommon/lltimer.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'indra/llcommon/lltimer.cpp') diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 05f6b789e4..23cebf4336 100644 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -287,15 +287,14 @@ LLTimer::~LLTimer() } // static -LLUnit::Microseconds LLTimer::getTotalTime() +LLUnit LLTimer::getTotalTime() { - LLUnit::Seconds sec = LLUnit::Milliseconds(2000) + LLUnit::Hours(1.f / 360.f); // simply call into the implementation function. return totalTime(); } // static -LLUnit::Seconds LLTimer::getTotalSeconds() +LLUnit LLTimer::getTotalSeconds() { return U64_to_F64(getTotalTime()) * USEC_TO_SEC_F64; } @@ -344,23 +343,23 @@ U64 getElapsedTimeAndUpdate(U64& lastClockCount) } -LLUnit::Seconds LLTimer::getElapsedTimeF64() const +LLUnit LLTimer::getElapsedTimeF64() const { U64 last = mLastClockCount; return (F64)getElapsedTimeAndUpdate(last) * gClockFrequencyInv; } -LLUnit::Seconds LLTimer::getElapsedTimeF32() const +LLUnit LLTimer::getElapsedTimeF32() const { return (F32)getElapsedTimeF64(); } -LLUnit::Seconds LLTimer::getElapsedTimeAndResetF64() +LLUnit LLTimer::getElapsedTimeAndResetF64() { return (F64)getElapsedTimeAndUpdate(mLastClockCount) * gClockFrequencyInv; } -LLUnit::Seconds LLTimer::getElapsedTimeAndResetF32() +LLUnit LLTimer::getElapsedTimeAndResetF32() { return (F32)getElapsedTimeAndResetF64(); } @@ -373,7 +372,7 @@ void LLTimer::setTimerExpirySec(F32 expiration) + (U64)((F32)(expiration * gClockFrequency)); } -LLUnit::Seconds LLTimer::getRemainingTimeF32() const +LLUnit LLTimer::getRemainingTimeF32() const { U64 cur_ticks = get_clock_count(); if (cur_ticks > mExpirationTicks) -- cgit v1.2.3