Do we require clock_gettime()?

Eric S. Raymond esr at
Mon Nov 25 13:38:07 UTC 2019

Hal Murray <hmurray at>:
> >From devel/hacking:
> Only POSIX-1.2001/SUSv3 library functions should be used (a few
> specific exceptions are noted below).  If a library
> function not in that standard is required, then a wrapper function for backward
> compatibility must be provided.  One notable case is clock_gettime()
> which is used, when available, for increased accuracy, and has a
> fallback implementation using native time calls.
> --------
> I haven't found any hints of a fallback mechanism in the current code.

You are quite right.  That documentation is stale; it predates the last
removal of a non-POSIX time call. IIRC that was a flaky part of an old version
of Mac OS X that we learned doesn't even work reliably - depends on which
rev of that major version of the OS.

You can remove it.
		<a href="">Eric S. Raymond</a>

More information about the devel mailing list