[Lazarus] Better implementation of GetTickcount using clock_gettime

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Apr 2 15:29:43 CEST 2014


On Wed, 02 Apr 2014 15:12:09 +0200
zeljko <zeljko at holobit.net> wrote:

>[...]
> > On Wed, 02 Apr 2014 14:01:26 +0200
> > zeljko <zeljko at holobit.net> wrote:
>[...]
> clock change due to the daylight
>[...]
> > See for example here:
> > http://man7.org/linux/man-pages/man2/clock_gettime.2.html
> 
> Do we read same man page ?

Yes.
Daylight changes are "discontinuous jumps", so CLOCK_MONOTONIC is not
affected by it.

 
> CLOCK_MONOTONIC
>                Clock that cannot be set and represents monotonic time
>                since some unspecified starting point.  This clock is
>                not affected by discontinuous jumps in the system time
>                (e.g., if the system administrator manually changes the
>                clock), *but is affected by the incremental adjustments
>                performed by adjtime(3) and NTP*.


Mattias




More information about the Lazarus mailing list