[Lazarus] Better implementation of GetTickcount using clock_gettime

zeljko zeljko at holobit.net
Wed Apr 2 10:53:19 CEST 2014


On 04/02/2014 10:01 AM, Mattias Gaertner wrote:
> On Wed, 02 Apr 2014 09:47:45 +0200
> Luca Olivetti <luca at wetron.es> wrote:
>
>> [...]
>> Btw, in theory CLOCK_MONOTONIC_RAW should be even better, though it's
>> only available from linux 2.6.28
>
> CLOCK_MONOTONIC_RAW lacks the fixes by NTP.

That's not good for Now(), but it's perfect solution for getTickCount().
GetTickCount() should not be aware of ntp or adjtime() changes - so in 
that case CLOCK_MONOTONIC_RAW is the only correct solution.

z.





More information about the Lazarus mailing list