lastest 9.0.15 broken GetTickCount

Giganews Newsgroups
Subject: lastest 9.0.15 broken GetTickCount
Posted by:  Pibì (nospam@tiscali.it)
Date: Sun, 24 Oct 2004

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