summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-06-09 22:37:39 +0800
committerErik Kundiman <erik@megapahit.org>2025-06-09 22:37:39 +0800
commitdd05837c7aa5314a553235f46d13c88df8e448a9 (patch)
tree481d3d9122ca322d00a6340220aeecffa187f8b4 /indra/newview/llappviewer.cpp
parentf8a13d8e14c5b420d2d76363f859febd11ee62ee (diff)
Fix usleep implementation for Windows
https://stackoverflow.com/questions/5801813/c-usleep-is-obsolete-workarounds-for-windows-mingw
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index d91d2d3f4c..94e8fabcb2 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1545,11 +1545,7 @@ bool LLAppViewer::doFrame()
if(fpsLimitSleepFor)
{
#if LL_WINDOWS
- U64 time1 = 0, time2 = 0;
- QueryPerformanceCounter((LARGE_INTEGER *)&time1);
- do {
- QueryPerformanceCounter((LARGE_INTEGER *)&time2);
- } while ((time2-time1) < fpsLimitSleepFor);
+ std::this_thread::sleep_for(std::chrono::microseconds(fpsLimitSleepFor));
#else
usleep(fpsLimitSleepFor);
#endif