From ed64630a67c2c216c369099532323cab2e251cab Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 30 Nov 2010 15:38:19 -0500 Subject: Use architecture-independent code for windows fast timers --- indra/llcommon/llfasttimer.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) mode change 100644 => 100755 indra/llcommon/llfasttimer.h diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h old mode 100644 new mode 100755 index 4ff93a553c..5c2df877b0 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -64,6 +64,7 @@ // shift off lower 8 bits for lower resolution but longer term timing // on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing +#ifdef USE_RDTSC inline U32 LLFastTimer::getCPUClockCount32() { U32 ret_val; @@ -94,6 +95,20 @@ inline U64 LLFastTimer::getCPUClockCount64() } return ret_val; } +#else +LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp +// These use QueryPerformanceCounter, which is arguably fine and also works on amd architectures. +inline U32 LLFastTimer::getCPUClockCount32() +{ + return (U32)(get_clock_count()>>8); +} + +inline U64 LLFastTimer::getCPUClockCount64() +{ + return get_clock_count(); +} +#endif + #endif -- cgit v1.2.3