This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cygwin with clock_gettime and CLOCK_MONOTONIC - gives always 0


Hi mum [1],

Corinna Vinschen wrote:

Works fine for me with the current Cygwin 1.7.17, and the upcoming
Cygwin 1.7.18:

  $ cat > ct.c <<EOF

At each run, your test case almost always starts with the same value:

$ gcc -o ct ct.c

$ ./ct
tv_sec = 0, tv_nsec = 2793
tv_sec = 0, tv_nsec = 999989104
tv_sec = 2, tv_nsec = 15365
tv_sec = 3, tv_nsec = 17879

$ ./ct
tv_sec = 0, tv_nsec = 2793
tv_sec = 0, tv_nsec = 999990222
tv_sec = 1, tv_nsec = 999997765
tv_sec = 3, tv_nsec = 3911

$ ./ct
tv_sec = 0, tv_nsec = 2793
tv_sec = 0, tv_nsec = 999987428
tv_sec = 2, tv_nsec = 5587
tv_sec = 3, tv_nsec = 11453

$ ./ct
tv_sec = 0, tv_nsec = 2793
tv_sec = 0, tv_nsec = 999989942
tv_sec = 1, tv_nsec = 999996088
tv_sec = 3, tv_nsec = 2514

$ ./ct
tv_sec = 0, tv_nsec = 2793
tv_sec = 0, tv_nsec = 999990222
tv_sec = 2, tv_nsec = 4190
tv_sec = 3, tv_nsec = 11733

$ ./ct
tv_sec = 0, tv_nsec = 3073
tv_sec = 0, tv_nsec = 999989942
tv_sec = 1, tv_nsec = 999996926
tv_sec = 3, tv_nsec = 3911

[...]

I wonder if this is to be expected...

and, Tobias, why your test case [2] prints always "0" [3]? it looks very similar to that of Corinna.. oops mum.. ;-)


Ciao,
 Angelo.


---
[1] http://cygwin.com/ml/cygwin-apps/2013-04/msg00120.html
[2] http://gcc.gnu.org/ml/fortran/2013-04/msg00082.html
[3] http://gcc.gnu.org/ml/fortran/2013-04/msg00084.html

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]