On 12/28/21 13:30, Bruno Haible wrote:

Isn't this currently a no-op, as all platforms that have timespec_get
(namely: glibc, FreeBSD, NetBSD, OpenBSD, macOS, Solaris 11) also
have clock_gettime?

Yes, it's just future-proofing.

Would it make sense to prefer timespec_get over clock_gettime on
some platforms?

Not as far as I know. On glibc, timespec_get simply calls clock_gettime, so it's a bit faster to call clock_gettime directly. I imagine other implementations are similar.

Reply via email to