mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -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.
|
// Spin for the remaining time.
|
||||||
while (Clock::now() < target)
|
while (Clock::now() < target)
|
||||||
|
{
|
||||||
|
#if defined(_WIN32)
|
||||||
|
YieldProcessor();
|
||||||
|
#else
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Namespace Common
|
} // Namespace Common
|
||||||
|
Reference in New Issue
Block a user