Jump to content
  • Advertisement

Archived

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

BeanDog

timeGetTime's resolution - please help EASY

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

What is the resolution on timeGetTime? Is it really to the millisecond or is it just to the nearest, say, 1/27 of a second like in oolldd dos? Is there a better way to handle this? I am using it to limit the framerate of my game to about 50fps. (very simple game) Thanks a lot ~BenDilts();

Share this post


Link to post
Share on other sites
Advertisement
I would always use GetTickCount() to calculate movement speeds, fps... but it would cause jerks during the game play and very wacked out fps calculations. I now use QueryPerformanceFrequency and QueryPerformancCounter for more accurate timing, this really improved the smoothness of objects moving on the screen and my frame rate is now very constant ( sync. with my refresh rate ).

I have also heard alot of people say to use the multimedia timers, but I have never fooled around with those.

oh ya, I'm not sure what timeGetTime's resolution is.

Edited by - ao on 3/16/00 2:56:57 PM

Share this post


Link to post
Share on other sites
How do you use the LARGE_INTEGER union?

I can''t subtract them - they are user-defined(kind of). I really really want to.

-Ben Dilts

Share this post


Link to post
Share on other sites
I am using visual c++ 5 in win98 and just used the __int64 instead of the LARGE_INTEGERs, you will have to type cast them though when calling QueryPerformanceCounter/Frequency.

Also keep in mind that the resolution of the timer may be different on another computer, Thats why there is the QueryPerformancFrequency. Heck, some might not even have a high-resolution performance counter according to the visual c++ 5 documentation.



Edited by - ao on 3/16/00 4:14:39 PM

Share this post


Link to post
Share on other sites
OK I got that working... Now how did you use that to sync with the vertical retrace? I''ve been workin on that awhile

Share this post


Link to post
Share on other sites
Oh, sorry, I meant to say that my fps is limited to my monitors refresh rate because when I'm using directX's flipping method I specify to wait for vertical refresh. Thats why my fps matches my refresh rate so closely.

Edited by - ao on 3/16/00 5:04:08 PM

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!