[fpc-devel] NowUTC in the RTL

zeljko zeljko at holobit.net
Fri Dec 9 15:37:54 CET 2011


On Friday 09 of December 2011 14:52:56 Sven Barth wrote:
> Am 09.12.2011 13:30, schrieb Michael Schnell:
> > On 12/09/2011 01:17 PM, Felipe Monteiro de Carvalho wrote:
> >> I would like to define it like this: "FPGetTickCount returns the
> >> amount of ticks since an unspecified initial time. This initial time
> >> is unknown, but is fixed for the entire duration of the application.
> >> Ticks are time intervals and all of them have the same duration, but
> >> their exact meaning in terms of real world units like milliseconds is
> >> unspecified. FPGetTickCount is not affected by timezones and also not
> >> by the user changing the system clock." So it matches
> >> Windows.GetTickCount well but still is flexible enough to be
> >> implemented in other platforms.
> > 
> > What if the PC is polling a time server or similar ? IMHO FPGetTickCount
> > should not be affected by such interference. This rules out using OS
> > time API calls.
> 
> The description of Felipe mathes Windows' GetTickCount (number of
> milliseconds since system start) and Linux' MONOTONIC_RAW time (or
> however it is called exactly). So I don't see why this should rule out
> OS time API calls...

No, MONOTONIC_RAW is introduced in 2.6.26 afair, so it won't run on older 
kernels.

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


More information about the fpc-devel mailing list