Sign in to follow this  

SDL_Delay

This topic is 3456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It could, depending on the resolution of your timers.

Then again, you shouldn't count on timers being entirely accurate even when CPU usage is 100%. Timers are typically implemented as events which are scheduled on the system's timer interrupt, which is generally around every 10ms. So a 10ms timer could end up taking nearly 20ms due to timing. A 500ms timer can take somewhere between 490ms and 510ms. Either way a reasonably acceptable deviation.

If you need delay precision in the order of magnitude of dozens of ms, I still find polling a high frequency counter the best solution. Does mean you get 100% cpu usage though.

Share this post


Link to post
Share on other sites

This topic is 3456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this