diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-04-03 15:45:30 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2025-04-03 15:48:51 -0500 |
| commit | e0e53f3235605c7d402a2c415a9154b3f48a8f97 (patch) | |
| tree | 7c0adb77c6b6ccecbab369a6e07348d07660d0b2 /Source/Core/Common/Timer.cpp | |
| parent | 7dc27753e2703bd979e32862b765bba475af291c (diff) | |
Common/Timer: Use YieldProcessor on Windows.
Diffstat (limited to 'Source/Core/Common/Timer.cpp')
| -rw-r--r-- | Source/Core/Common/Timer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/Core/Common/Timer.cpp b/Source/Core/Common/Timer.cpp index 29febef6c5..0a23080c6f 100644 --- a/Source/Core/Common/Timer.cpp +++ b/Source/Core/Common/Timer.cpp @@ -185,7 +185,13 @@ void PrecisionTimer::SleepUntil(Clock::time_point target) // Spin for the remaining time. while (Clock::now() < target) + { +#if defined(_WIN32) + YieldProcessor(); +#else std::this_thread::yield(); +#endif + } } } // Namespace Common |
