2 Replies - 324 Views - Last Post: 29 January 2012 - 08:41 PM Rate Topic: -----

Topic Sponsor:

#1 bijan311  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 31-January 10

GetTickCount or QueryPerformanceCounter

Posted 29 January 2012 - 01:29 PM

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?
Is This A Good Question/Topic? 0
  • +

Replies To: GetTickCount or QueryPerformanceCounter

#2 ButchDean  Icon User is offline

  • Pro Games Programmer
  • member icon


Reputation: 689
  • View blog
  • Posts: 2,504
  • Joined: 26-November 10

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.

This post has been edited by ButchDean: 29 January 2012 - 02:38 PM

Was This Post Helpful? 0
  • +
  • -

#3 bijan311  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 61
  • Joined: 31-January 10

Re: GetTickCount or QueryPerformanceCounter

Posted 29 January 2012 - 08:41 PM

Thanks, that's all I needed to know
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1