Xorg vs gettimeofday() and clock_gettime()
John Hein
jhein at timing.com
Wed Feb 27 10:27:14 UTC 2008
Thomas Mueller wrote at 10:32 +0100 on Feb 27, 2008:
> Apparently the autoconf check for presence of CLOCK_MONOTONIC fails on
> FreeBSD:
>
> #define _POSIX_C_SOURCE 199309L
> #include <time.h>
>
> int main(int argc, char *argv[]) {
> struct timespec tp;
>
> if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
> return 0;
> else
> return 1;
> }
>
> /usr/include/time.h:
> #if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
> #define CLOCK_REALTIME 0
> [...]
> #define CLOCK_MONOTONIC 4
>
> Was CLOCK_MONOTONIC already defined for _POSIX_C_SOURCE 199309?
It was added to time.h on 2005-04-02 and since then, it was always
under _POSIX_C_SOURCE 2000112.
More information about the freebsd-x11
mailing list