[fpc-devel] NowUTC in the RTL
Sven Barth
pascaldragon at googlemail.com
Fri Dec 9 16:15:41 CET 2011
Am 09.12.2011 15:22, schrieb Michael Schnell:
> On 12/09/2011 02:52 PM, Sven Barth wrote:
>>
>> 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...
>
> He writes: " Ticks are time intervals and all of them have the same
> duration "
>
> So the counting is not allowed to stop or to jump forward in case a time
> server access by daemon changing the system time is not allowed to
> interfere in any way.
>
> So I suppose "GetTickCount (number of milliseconds since system start)"
> would be OK, but MONOTONIC_RAW time does not _sound_ correct.
I haven't found an entry for "MONOTONIC_RAW" (my system's manpage has
one, but I'm currently at work), but for MONOTONIC:
CLOCK_MONOTONIC
Clock that cannot be set and represents monotonic time since some
unspecified starting point.
So even if a deamon plays around with the time the MONOTONIC clock
should not be affected. That's the basic idea of the MONOTONIC clocks.
> On Linux, "get_jiffies_64()" seems to be a decent Kernel call.
I don't know that, so I can't comment here.
Regards,
Sven
More information about the fpc-devel
mailing list