Re: gettickcount returns a negative number???



On Thu, 25 Aug 2005 10:57:05 -0700, "Sam Hobbs"
<samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>"J French" <erewhon@xxxxxxxxxx> wrote in message
>news:430dca8e.20117134@xxxxxxxxxxxxxxxxxxxxxxx
>> On Wed, 24 Aug 2005 20:44:40 -0700, "Sam Hobbs"
>> <samuel@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
>>
>>>"Karl E. Peterson" <karl@xxxxxxxx> wrote in message
>>>news:%23bWPHIRqFHA.3720@xxxxxxxxxxxxxxxxxxxxxxx
>>
>>>> Have you not considered that before recommending it?
>>
>>>I assume then that you don't have an answer to the question of why
>>>QueryPerformanceCounter is inappropriate.
>>
>> Well, simplistically, GetTickCount is the time you have been alive

>> QueryPerformanceCounter is your rate of heart beat

>> Apples and Oranges

>QueryPerformanceFrequency is the heart beat, correct?

To be fair, what I said was totally misleading

QueryPerformanceCounter is fairly similar to GetTickCount
- except it inceases a lot faster
- its rate of increase depends on the hardware
- which means that athough the 'number' is larger, it will potentially
wrap a lot quicker, and its wrap time will vary from machine to
machine - the faster the timer - the quicker the wrap

It really is not suitable for solving OP's problem
- it introduces a whole new load of problems

The best solution that I can think of is to use GetSystemTime which
has the advantage of being in UTC


.



Relevant Pages

  • Re: GetTickCount
    ... The GetTickCount retries the number of milliseconds that have ... Zeitmessungen gibt es aber inzwischen genauere Quellen, ... ziemlich sicher das der Counter welcher mit QueryPerformanceCounter ... ausgelesen wird, durch den gleichen Timer wie GetTickCount gefüttert ...
    (de.comp.lang.delphi.misc)
  • RE: GetTickCount problem P4 hyperthread
    ... >> QueryPerformanceCounter ... >> and QueryPerformanceFrequency instead of GetTickCount. ... >> Vladimir Nesterovsky ... > computer to be in the same condition like the client, and the bug was ...
    (microsoft.public.dotnet.languages.vc)
  • Re: how to measure time which expire between two events
    ... Note that GetTickCount counts the amount of ... the values are fairly untrustworthy in terms of time spent in your code. ... QueryPerformanceCounter counts time in your thread. ... So the time returned by GetTickCount can't be trusted ...
    (microsoft.public.vc.mfc)
  • Zeitmessen: QueryPerformanceCounter vs GetTickCount
    ... Ich möchte den Zeitverbrauchn einer Routine messen und bekomme bei der ... GetTickCount 2516 ms?! ... Ganz oben steht: ... Sollte QueryPerformanceCounter eine besondere ...
    (de.comp.lang.delphi.misc)
  • Re: Negative difference between QueryPerformanceCounter values
    ... GetTickCount (in milliseconds) ... one millisesecond) is in fact completely random, causing inconsistent timing ... QueryPerformanceCounter works on their platform. ... Use GetTickCount, that's known to work. ...
    (microsoft.public.pocketpc.developer)