Overriding GetTickCount??

Giganews Newsgroups
Subject: Overriding GetTickCount??
Posted by:  Milan VXdgsvt (milan_vxdgs…@seznam.cz)
Date: Fri, 14 Nov 2003

Hello.

I have an application that checks for operation timing-out by calling
GetTickCount and checking if enough time passed. However, the value is
initialized in one module and checked in another. One of these uses Indy,
the other does not. So, one uses IdGlobal.GetTickCount, the other uses
Windows.GetTickCount. However, the values are offset by some 12000!! So the
testing code gets completely broken. I checked that in Indy10 the problem is
the same (IdCoreGlobal.pas).

Why do you override an existing function to give different results?? If the
behavior is different, so should be the names.

Not that I would really care, I fixed this by calling Windows.GetTickCount
explicitely and will stop using Indy anyway as I cannot accept the blocking
concept, but generally I think renaming the GetTickCount to IdGetTickCount
would save some people some hair in the future.

    Milan Vandrovec

Replies