Jump to content
  • Advertisement

Archived

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

Cahaan

GetTickCount() versus timeGetTime()

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

Ok GetTickCount() just works fine for me, I just need to calculated some elapsed time ((timeB - timeA) <= some milliseconds), so I guess it''s ok. Will I get any advantages to use timeGetTime() instead ?

Share this post


Link to post
Share on other sites
Advertisement
GetTickCount is limited to the resolution of the system timer (55ms on Windows 9x, 10ms on Windows NT, possible 2K/XP as well). You can choose the resolution of timeGetTime (using timeBeginPeriod and timeEndPeriod) and the default resolution is 1ms on Windows 9x, 5+ms on Windows NT.

Simply put: timeGetTime is more accurate and you''ll need it if you want to be sure you can measure an interval <55ms. (If you need it to be more accurate than 1ms, use the Performance Counter instead).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!