Timing in games
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
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
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.
QueryPerformanceCounter, on the other hand, is very accurate in addition to having a low resolution.
I vote in favour of QueryPerformanceCounter too, infact i use it in AsciiRis.
An ASCII tetris clone... | AsciiRis
An ASCII tetris clone... | AsciiRis
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement