Re: lastest 9.0.15 broken GetTickCount

Giganews Newsgroups
Subject: Re: lastest 9.0.15 broken GetTickCount
Posted by:  Andy Neillans [ABCC Computers] (an…@abcc-computers.co.uk)
Date: Sun, 24 Oct 2004

Looking in the VCS, the change was made on 24th Sept 04, and has the
comment: Modified GetTickCount to correct RangeOverflow error. (Reported by
Mike Potter).

However, it does appear something odd is happening on your machine; can you
post additional code showing how you are calling GetTickCount etc ?

Andy

"Pibì" <nospam@tiscali.it> wrote in message
news:B579099B84B1E240nospam@tiscali.it...
> Unit IdGlobal, function GetTickCount
>
> in 9.0.14:
>
> function GetTickCount: Cardinal;
> var
>  nTime, freq: Int64;
> begin
>  if Windows.QueryPerformanceFrequency(freq) then
>    if Windows.QueryPerformanceCounter(nTime) then
>        result:=Trunc(nTime/Freq*1000)
>    else
>        result:= Windows.GetTickCount
>  else
>    result:= Windows.GetTickCount;
> end;
>
> in 9.0.15:
>
> function GetTickCount: Cardinal;
> var
>  nTime, freq: Int64;
> begin
>  if Windows.QueryPerformanceFrequency(freq) then
>    if Windows.QueryPerformanceCounter(nTime) then
> >      // ERROR
>        result:=Trunc(nTime/(Freq*1000))
>    else
>        result:= Windows.GetTickCount
>  else
>    result:= Windows.GetTickCount;
> end;
>
> on my pc, return value is always 131 :-(
>
> saluti  Paolo

Replies

In response to

lastest 9.0.15 broken GetTickCount posted by Pibì on Sun, 24 Oct 2004