I'm reading a game programming book, and it said to use the QueryPerformanceCounter function to keep track of time, but I've always used the GetTickCount function. So my question is, is one better for keeping track of time in game, or are they about the same?
GetTickCount or QueryPerformanceCounter
Page 1 of 12 Replies - 324 Views - Last Post: 29 January 2012 - 08:41 PM
Topic Sponsor:
Replies To: GetTickCount or QueryPerformanceCounter
#2
Re: GetTickCount or QueryPerformanceCounter
Posted 29 January 2012 - 02:36 PM
You shouldn't need QueryPerformanceCounter() for your game unless you are specifically analyzing performance issues in your code that requires a high resolution counter. GetTickCount() is perfectly fine for the average implementation of a game, as cycles rarely, if ever, require a resolution less that 1ms.
[edit]
Read this.
[edit]
Read this.
This post has been edited by ButchDean: 29 January 2012 - 02:38 PM
#3
Re: GetTickCount or QueryPerformanceCounter
Posted 29 January 2012 - 08:41 PM
Thanks, that's all I needed to know
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|