[fpc-devel] About GetTickCount

zeljko zeljko at holobit.net
Thu Nov 3 09:41:05 CET 2011


I guess that there's no GetTickCount in RTL.
Is it possible to add it there ?
Why ?
Because current GetTickCount in lazarus uses Now() which is movable 
backward/forward by ntpd under unixes, and that could be a huge problem.

This is what MSDN says about GetTickCount:
Retrieves the number of milliseconds that have elapsed since the system was 
started, up to 49.7 days (what they do after 49.7 days ? ).

So, according to POSIX clock_gettime(CLOCK_MONOTONIC) is supported on linux, 
bsd and others, and in that case we can have exact GetTickCount.
If there's no support for monotonic clock on some platform , now() can be 
returned anytime.



zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20111103/30620d77/attachment.html>


More information about the fpc-devel mailing list