• Advertisement

Archived

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

Time Keeping

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

Using windows functions is the a more accurate way of measuring the passage of time than GetTickCount()

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Look up Multimedia Timer Functions...those give you precision up to 1 millisecond. timeGetTime()...etc...

Share this post


Link to post
Share on other sites
Check out QueryPerformanceCounter().
That one''s pretty darn accurate.

*Sparkle*

Share this post


Link to post
Share on other sites
I use QueryPerformance...() function since it will return values below 1ms. If the above function fails (usually on 486 cpus and below) I use timeGetTime(). I doubt that on 486 and below my rendering will complete below 1ms and if it does I set it to 1ms. But all new cpus will work with the more precise QueryPerformance...(). Then I calculate the time in seconds it took to render my frame and send this value to my drawing functions that tie the animations to a time which I can alter so the animations can play slow or fast.

Cheers

Share this post


Link to post
Share on other sites

  • Advertisement