diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-22 02:30:02 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-03-27 23:45:22 +0200 |
commit | e1bce50d8ba139cf71b4225b4a416d84c65f3e0e (patch) | |
tree | dd123895c15e09d8b2e5110b74f6acc2449f530e | |
parent | x64: Add MicroSleep (diff) | |
download | yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar.gz yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar.bz2 yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar.lz yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar.xz yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.tar.zst yuzu-e1bce50d8ba139cf71b4225b4a416d84c65f3e0e.zip |
-rw-r--r-- | src/core/core_timing.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index cd4df4522..4f2692b05 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -10,6 +10,10 @@ #include "common/windows/timer_resolution.h" #endif +#ifdef ARCHITECTURE_x86_64 +#include "common/x64/cpu_wait.h" +#endif + #include "common/microprofile.h" #include "core/core_timing.h" #include "core/core_timing_util.h" @@ -269,7 +273,11 @@ void CoreTiming::ThreadLoop() { if (wait_time >= timer_resolution_ns) { Common::Windows::SleepForOneTick(); } else { +#ifdef ARCHITECTURE_x86_64 + Common::X64::MicroSleep(); +#else std::this_thread::yield(); +#endif } } |