Archived

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

Floating

Windows XP and timer resolution

Recommended Posts

Hi, I recently changed to Windows XP (from Windows 98) and it seems that the resolution of timers has changed! Before I had a 1ms resolution, now it seems that I have a 16ms resolution!! I get the time with: int theTime=(int)timeGetTime(); and I call timeBeginPeriod(1) at the beginning and timeEndPeriod(1) at the end of my application. What do I do wrong? Thanks

Share this post


Link to post
Share on other sites
Yes, the default timer resolution has changed from ~1ms to ~5ms from Win9x to WinXP (actually any NT based Windows OS).

As for your problem, you should call timeGetDevCaps to get the minium supported time period, and not assume its 1ms.

Share this post


Link to post
Share on other sites