diff options
author | Eli Linden <eli@lindenlab.com> | 2010-01-26 14:33:28 -0800 |
---|---|---|
committer | Eli Linden <eli@lindenlab.com> | 2010-01-26 14:33:28 -0800 |
commit | a87cbadf16cb8a32ea78fb605403472ee866bccf (patch) | |
tree | 07b4eb3d31491ca30d02952442ce53b1cd426c55 /indra/llcommon/llfasttimer.h | |
parent | 3f7ed7ef1de1012e3bea719e8042a256deb10ac3 (diff) | |
parent | fee564c26e1018787cf70b95fc677c1da447118c (diff) |
Merge
Diffstat (limited to 'indra/llcommon/llfasttimer.h')
-rw-r--r-- | indra/llcommon/llfasttimer.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 32f3561616..48461df6ae 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -113,7 +113,7 @@ inline U64 LLFastTimer::getCPUClockCount64() struct timespec tp; #ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time? - if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime, try REALTIME + if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME #endif clock_gettime(CLOCK_REALTIME,&tp); @@ -122,7 +122,7 @@ inline U64 LLFastTimer::getCPUClockCount64() inline U32 LLFastTimer::getCPUClockCount32() { - return (U32)LLFastTimer::getCPUClockCount64(); + return (U32)(LLFastTimer::getCPUClockCount64() >> 8); } #endif // (LL_LINUX || LL_SOLARIS)) @@ -134,14 +134,14 @@ inline U32 LLFastTimer::getCPUClockCount32() { U64 x; __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return (U32)x >> 8; + return (U32)(x >> 8); } inline U64 LLFastTimer::getCPUClockCount64() { U64 x; __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return x >> 8; + return x; } #endif @@ -154,7 +154,7 @@ inline U64 LLFastTimer::getCPUClockCount64() inline U32 LLFastTimer::getCPUClockCount32() { - return (U32)get_clock_count(); + return (U32)(get_clock_count()>>8); } inline U64 LLFastTimer::getCPUClockCount64() |