why is windows so bad

This commit is contained in:
Green Sky 2024-01-05 15:14:58 +01:00
parent 5a0252d8d0
commit 2bf4cb9c45
No known key found for this signature in database

View File

@ -139,6 +139,7 @@ int main(int argc, char** argv) {
//);
#if 0
if (render || tick) {
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // yield for 1ms
} else {
@ -159,6 +160,10 @@ int main(int argc, char** argv) {
));
#endif
}
#else
// msvc stl sleep_until got "clock aware" in oct 2023, gotta be some time until we can use this
std::this_thread::sleep_until(std::chrono::steady_clock::now() + std::chrono::milliseconds(1)); // yield for 1ms
#endif
}
return 0;