Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DerekDay

Accurate Timing

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

Hey. I need to know if there is a move accurate timer than timeGetTime() that is fairly accessible. If I have to write ASM to access it, then nevermind... I''m just wondering cause I thought I remember either using something different a while back or heard someone talking about this previously. I''ve found that timeGetTime() is good enough if I''m using it to test stuff over 20 - 30ms, but when I get down lower than that, it starts to give me crappy reliability... I''m just fine tuning, so if there isn''t one... oh well. -DerekDay

Share this post


Link to post
Share on other sites
Advertisement
SetTimer is OK, but then the SetTimer function is totally reliant of the FPS of the program, so i would guess that antoher way to do it would to be to create a seperate thread and do timer stuff there, or is that over-kill?

Share this post


Link to post
Share on other sites
You can use QueryPerformanceCounter() to get the number of clock cycles that have passed in a given time. If you know the speed of the CPU, you can convert it into (milli)seconds or any other unit of time you wish to use.

Share this post


Link to post
Share on other sites
Nevermind... I found the problem... It actually wasn''t related to timeGetTime(). It seems to always happen like that.
-Derek

Share this post


Link to post
Share on other sites

  • 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!