Further improve sleep accuracy on UNIX systems
- Jan 10, 2025
-
-
Alam Ed Arias authored
-
- Jan 06, 2025
-
-
Hanicef authored
-
- Jan 05, 2025
- Jan 04, 2025
-
-
Hanicef authored
-
Expanding on !2184 (merged), combining the new solution with high-accuracy sleep to reduce CPU usage with the old solution for accurate frame limiting. This gives identical results to the original solution while still giving a far lower CPU usage, which is beneficial for battery-powered systems like laptops.
Note that if any system somehow isn't able to reach under 100 microsecond accuracy, it will not busy-wait, although a system with such a low accuracy is currently not known to me (normal sleep accuracy is slightly above 50 microseconds, half of what the required accuracy is).
Possibly fixes #1210 (closed)