how do you do timing?

Started by
1 comment, last by Silex 18 years, 7 months ago
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.
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?
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.

This topic is closed to new replies.

Advertisement