[Lazarus] How to program with time in milliseconds?

Michael Schnell mschnell at lumino.de
Mon May 19 10:03:22 CEST 2014


On 05/18/2014 08:10 PM, Graeme Geldenhuys wrote:
> {$IFDEF Windows}
> begin
>    QueryPerformanceCounter(Result);
Did you check that this is a low overhead function ?
> {$ELSE}
> do_syscall(syscall_nr_clock_gettime,TSysParam(CLOCK_MONOTONIC),TSysParam(@ts))
It seems that a syscall is not necessary with some / many environments.

vDSO seems to provide a user-land implementation in (many) current 
Kernel versions.

Maybe directly accessing the appropriate CPU registers is possible / 
viable in some architectures

-Michael




More information about the Lazarus mailing list