Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0

2013-04-11 Thread Tobias Burnus
Tobias Burnus: b) Newlib is broken. For clock_gettime, CLOCK_MONOTONIC is not implemented. But both CLOCK_MONOTONIC and even _POSIX_MONOTONIC_CLOCK (with value 200112L) are defined. However, POSIX states: "If the Monotonic Clock option is supported, all implementations shall suppo

Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0

2013-04-11 Thread Tobias Burnus
Corinna Vinschen wrote: On Apr 11 21:13, Tobias Burnus wrote: Where is actually the source code of the clock_gettime, which Cygwin uses? I thought that it was newlib. But looking at http://sourceware.org/cgi-bin/cvsweb.cgi/src/newlib/libc/sys/linux/clock_gettime.c?cvsroot=src the code should

Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0

2013-04-11 Thread Tobias Burnus
Corinna Vinschen wrote: Works fine for me with the current Cygwin 1.7.17, and the upcoming Cygwin 1.7.18: if (!clock_gettime (CLOCK_MONOTONIC, &tp)) printf ("tv_sec = %ld, tv_nsec = %ld\n", tp.tv_sec, tp.tv_nsec); ... tv_sec = 0, tv_nsec = 29920 Where is actually the source cod

Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0

2013-04-11 Thread Tobias Burnus
Please CC your reply to fort...@gcc.gnu.org Dear all, using clock_gettime with CLOCK_MONOTONIC fails on Cygwin; it always gives 0. That breaks code compiled with GCC's gfortran which uses system_clock in libgfortran. libgfortran uses CLOCK_MONOTONIC if defined and otherwise it falls back to