Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timer improvements: add wait loop #20

Open
tamara-schmitz opened this issue Nov 3, 2017 · 0 comments
Open

Timer improvements: add wait loop #20

tamara-schmitz opened this issue Nov 3, 2017 · 0 comments

Comments

@tamara-schmitz
Copy link
Owner

The timer class is quite imprecise in its method of ensuring that the framerate does not exceed the user specified maximum. A better way of doing things is to sleep less through nanosleep than required and then wait the remaining time through busy waiting (e.g. while loop until target time reached).

The current sleepoverrun may still be useful though as it could help determine how early the busy waiting loop should start. Though the algorithm could use some improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant