• Advertisement

Archived

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

Accurate Timing

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