summaryrefslogtreecommitdiff
path: root/indra/llcommon/lltimer.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-11-30 13:25:00 -0600
committerDave Parks <davep@lindenlab.com>2022-11-30 13:25:00 -0600
commit87bb72a47a1fc64b98e498120e332de76e6a9211 (patch)
tree1e48ca7915525368bf3eda06447ab4edcaf0be60 /indra/llcommon/lltimer.cpp
parentadbd264d35f5fabe28249839da6c12e5dac4127f (diff)
SL-18154 WIP -- CPU sampling (AMD uProf) profile guided optimizations to reduce CPU usage of background threads.
Diffstat (limited to 'indra/llcommon/lltimer.cpp')
-rw-r--r--indra/llcommon/lltimer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcommon/lltimer.cpp b/indra/llcommon/lltimer.cpp
index 8739eeef00..24eaa4c1a9 100644
--- a/indra/llcommon/lltimer.cpp
+++ b/indra/llcommon/lltimer.cpp
@@ -92,6 +92,7 @@ U32 micro_sleep(U64 us, U32 max_yields)
U32 micro_sleep(U64 us, U32 max_yields)
{
LL_PROFILE_ZONE_SCOPED
+#if 0
LARGE_INTEGER ft;
ft.QuadPart = -static_cast<S64>(us * 10); // '-' using relative time
@@ -99,6 +100,9 @@ U32 micro_sleep(U64 us, U32 max_yields)
SetWaitableTimer(timer, &ft, 0, NULL, NULL, 0);
WaitForSingleObject(timer, INFINITE);
CloseHandle(timer);
+#else
+ Sleep(us / 1000);
+#endif
return 0;
}