I think the clock_gettime() and CLOCK_REALTIME definitions are pulled in through
the following condition in time.h.
> /* POSIX 2008 says clock_gettime and timespec are defined in time.h header,
> but other systems - like Linux, Solaris, etc - tend to declare such
> recent extensions only if the following guards are met. */
> #if !defined(IN_WINPTHREAD) && \
> ((!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
> (_POSIX_C_SOURCE > 2) || defined(__EXTENSIONS__))
> #include <pthread_time.h>
> #endif
I think the clock_gettime() and CLOCK_REALTIME definitions are pulled in through
the following condition in time.h.
> /* POSIX 2008 says clock_gettime and timespec are defined in time.h header, IN_WINPTHREAD) && \ _STRICT_ STDC) && !defined( __XOPEN_ OR_POSIX) ) || \ __EXTENSIONS_ _))
> but other systems - like Linux, Solaris, etc - tend to declare such
> recent extensions only if the following guards are met. */
> #if !defined(
> ((!defined(
> (_POSIX_C_SOURCE > 2) || defined(
> #include <pthread_time.h>
> #endif
https:/ /github. com/mirror/ mingw-w64/ blob/3ac71ed310 5c2989ba378e2e8 8d9405f65797178 /mingw- w64-headers/ crt/time. h#L302- L309