[Lazarus] Portable way to get accurate timestamps?

waldo kitty wkitty42 at windstream.net
Mon Feb 21 04:16:25 CET 2011


On 2/20/2011 08:46, Luca Olivetti wrote:
> Al 20/02/11 12:42, En/na Bo Berglund ha escrit:
>
>> I wonder if GetTickCount will get me a better value to milliseconds
>> than Now()?
>
> Not under linux:
>
> function GetTickCount: DWord;
> begin
>    Result := DWord(Trunc(Now * 24 * 60 * 60 * 1000));
> end;

i gotta ask... is that even accurate? what are those "ticks" that are being 
counted? by the above, they surely do not appear to be the machine's actual 
clock timer ticks... can those even be accessed in today's world or do we really 
need to revert some things like this back to the DOS world???




More information about the Lazarus mailing list