Sign in to follow this  

SDL_delay for framerate

This topic is 3724 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

Im calculating the framerate like this: SDL_Delay(1000/FRAME_RATE); Now Ive heard SDL_Delay is instable to "system load changes"(whatever that is) and it is *only* 10ms exact. So is my code in any way a suboptimal solution and if why and how would I do it better?

Share this post


Link to post
Share on other sites
I am too lazy to answer this again in such a short period of time, so check out this thread

Edit:

Quote:
Original post by schattenmaennlein
whats imperfect about a busy loop?


The obvious, you could be using those cycles you're stalling the CPU into useful things like calculating an A* path for example.

[Edited by - Kwizatz on October 2, 2007 7:38:23 PM]

Share this post


Link to post
Share on other sites

This topic is 3724 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