Time Keeping
Using windows functions is the a more accurate way of measuring the passage of time than GetTickCount()
------------------------------"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.
March 16, 2000 12:27 PM
Look up Multimedia Timer Functions...those give you precision up to 1 millisecond. timeGetTime()...etc...
Check out QueryPerformanceCounter().
That one''s pretty darn accurate.
*Sparkle*
That one''s pretty darn accurate.
*Sparkle*
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
Cheers
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement