mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 09:59:32 -06:00
Common/Timer: Use YieldProcessor on Windows.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user