Jump to content
  • Advertisement

Archived

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

quant

Timing in games

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

Whats the most accurate timing function to use in windows games? QueryPerformanceCounter?

Share this post


Link to post
Share on other sites
Advertisement
AS far as i know that is one of the more accurate timer functions. If you want less accurate as well, there is GetTickCount() which only returns the time of up to one millisecond of resolution.

I am not sure of the accuracy of QueryPerformanceCounter, but you can be sure to find the answer at MSDN You can find many answers here before posting, and its quite easy with the simple questions like this.

Hope that helped in some way.

-J

Share this post


Link to post
Share on other sites
Note that there is a distinct difference between "accuracy" and "resolution". While the resolution of GetTickCount may be 1 ms, it''s accuracy will vary depending on the system. For example, on my system its accuracy is 10 ms.

QueryPerformanceCounter, on the other hand, is very accurate in addition to having a low resolution.

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!