Jump to content
  • Advertisement
Sign in to follow this  
Silex

how do you do timing?

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

I've used SDL timing functions up to this point but I'm trying to move away from it, and was wondering what alternatives people use? I suppose it would be easy enough to write my own, but I'm interested in what there is already out there.

Share this post


Link to post
Share on other sites
Advertisement
Mind if I ask why you are trying to move away from SDL's functions if you are using SDL? On Windows systems that support the highest resolution timer avaliable, QueryPerformanceCounter, SDL uses that system. Otherwise it will use timeGetTime, and finally the time function.

If you want to see an example of a small class that wraps the QueryPerformanceCounter, take a look here. Now compare that to just using SDL, and you can see why I'm asking [wink]

Are you looking for anything functionality specific?

Share this post


Link to post
Share on other sites
I'm no longer going to use SDL for the windowing aspect of my application, and I would like to reduce dependencies. Of course when I began making the switch it occured to me I use SDL a lot more than I remembered, and timing is one place where its used, so I was wondering what alternatives I had. The main draw of SDL for me is the cross platform aspect.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!