[Lazarus] Better implementation of GetTickcount using clock_gettime

Marco van de Voort marcov at stack.nl
Wed Apr 2 21:35:54 CEST 2014

On Wed, Apr 02, 2014 at 03:11:32PM +0200, Luca Olivetti wrote:
> > I don't see _RAW and _COARSE anywhere in the mentioned opengroup link.
> > Keep in mind this is UNIX gettickcount, not linux gettickcount.
> Correct, but the function clock_gettime is currently only defined for
> Linux (at least I grepped the sources for fpc 2.6.4 and only found it
> there).

Still, I think this heavy OS dependent code and ifdeffing is not good.
gettickcount should be removed from unix/ to something OS specific.

At best one $if to list the OSes that use the generic way that can stay

More information about the Lazarus mailing list