From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/llcommon/lltimer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/llcommon/lltimer.cpp') diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp index 25383fc4d8..8f5a886a37 100755 --- a/indra/llcommon/lltimer.cpp +++ b/indra/llcommon/lltimer.cpp @@ -43,7 +43,6 @@ // // Locally used constants // -const U32 SEC_PER_DAY = 86400; const F64 SEC_TO_MICROSEC = 1000000.f; const U64 SEC_TO_MICROSEC_U64 = 1000000; const F64 USEC_TO_SEC_F64 = 0.000001; @@ -204,6 +203,8 @@ F64 calc_clock_frequency(unsigned int uiMeasureMSecs) return 1000000.0; // microseconds, so 1 MHz. } +const U64 SEC_TO_MICROSEC_U64 = 1000000; + U64 get_clock_count() { // Linux clocks are in microseconds @@ -226,7 +227,7 @@ void update_clock_frequencies() // returns a U64 number that represents the number of // microseconds since the unix epoch - Jan 1, 1970 -U64 totalTime() +LLUnitImplicit totalTime() { U64 current_clock_count = get_clock_count(); if (!gTotalTimeClockCount) @@ -263,7 +264,7 @@ U64 totalTime() } // Return the total clock tick count in microseconds. - return (U64)(gTotalTimeClockCount*gClocksToMicroseconds); + return LLUnits::Microseconds::fromValue(gTotalTimeClockCount*gClocksToMicroseconds); } @@ -375,7 +376,7 @@ LLUnitImplicit LLTimer::getElapsedTimeAndResetF32() /////////////////////////////////////////////////////////////////////////////// -void LLTimer::setTimerExpirySec(F32 expiration) +void LLTimer::setTimerExpirySec(LLUnitImplicit expiration) { mExpirationTicks = get_clock_count() + (U64)((F32)(expiration * gClockFrequency)); -- cgit v1.2.3