mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-13 16:17:13 +00:00
refactor: replace 0ms sleep with a proper yield
This commit is contained in:
parent
8e94b763a7
commit
d9f03fdddf
|
|
@ -2144,8 +2144,10 @@ void Minecraft::run_middle() {
|
|||
achievementPopup->render();
|
||||
|
||||
PIXBeginNamedEvent(0, "Sleeping");
|
||||
std::this_thread::sleep_for(
|
||||
std::chrono::milliseconds(0)); // 4J - was Thread.yield())
|
||||
std::this_thread::yield_now(); // 4jcraft added now that we have
|
||||
// portable thread yield.
|
||||
// std::this_thread::sleep_for(
|
||||
// std::chrono::milliseconds(0)); // 4J - was Thread.yield())
|
||||
PIXEndNamedEvent();
|
||||
|
||||
// if (Keyboard::isKeyDown(Keyboard::KEY_F7))
|
||||
|
|
|
|||
Loading…
Reference in a new issue