mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
Common/Timer: Use YieldProcessor on Windows.
This commit is contained in:
parent
7dc27753e2
commit
e0e53f3235
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue