Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2008 03:27:02 -0700
From:      John Hein <jhein@timing.com>
To:        Thomas Mueller <tmueller@sysgo.com>
Cc:        freebsd-x11@freebsd.org, d@delphij.net
Subject:   Re: Xorg vs gettimeofday() and clock_gettime()
Message-ID:  <18373.15094.120547.799908@gromit.timing.com>
In-Reply-To: <20080227103210.694787ec@tom.ulm.sysgo.com>
References:  <47C320DB.70004@delphij.net> <18371.11144.568407.26227@gromit.timing.com> <20080227103210.694787ec@tom.ulm.sysgo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18373.15094.120547.799908>