Skip to content
Snippets Groups Projects

Further improve sleep accuracy on UNIX systems

Merged Hanicef requested to merge Hanicef/SRB2Classic:improve-sleep-accuracy into next

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)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading