[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/5] gettime: port better to non-POSIX C2x

From: Paul Eggert
Subject: Re: [PATCH 1/5] gettime: port better to non-POSIX C2x
Date: Tue, 28 Dec 2021 13:50:04 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

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

[Prev in Thread] Current Thread [Next in Thread]