Discussion:
CLOCK_MONOTONIC in Timers functions
Yaakov (Cygwin/X)
2011-08-03 19:00:04 UTC
Permalink
POSIX requires the Timers functions (timer_create, timer_[gs]ettime,
etc.) to also support CLOCK_MONOTONIC if the _POSIX_MONOTONIC_CLOCK
option is available. I'm willing to take a look at making this happen
when I have the chance. (Getting gcc 4.5 out is my first priority now.)

I see that timer.cc uses its own WaitForSingleObject calls instead of
using cancelable_wait(). Is there a good reason for this, or could this
be rewritten in terms of the latter?


Yaakov
Corinna Vinschen
2011-08-04 16:13:06 UTC
Permalink
Post by Yaakov (Cygwin/X)
POSIX requires the Timers functions (timer_create, timer_[gs]ettime,
etc.) to also support CLOCK_MONOTONIC if the _POSIX_MONOTONIC_CLOCK
option is available. I'm willing to take a look at making this happen
when I have the chance. (Getting gcc 4.5 out is my first priority now.)
I see that timer.cc uses its own WaitForSingleObject calls instead of
using cancelable_wait(). Is there a good reason for this, or could this
be rewritten in terms of the latter?
I don't see a reason to stick to WFMO if using cancelable_wait allows
to extend the timer functions as you propose.


Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
Christopher Faylor
2011-08-04 17:02:27 UTC
Permalink
Post by Corinna Vinschen
Post by Yaakov (Cygwin/X)
POSIX requires the Timers functions (timer_create, timer_[gs]ettime,
etc.) to also support CLOCK_MONOTONIC if the _POSIX_MONOTONIC_CLOCK
option is available. I'm willing to take a look at making this happen
when I have the chance. (Getting gcc 4.5 out is my first priority now.)
I see that timer.cc uses its own WaitForSingleObject calls instead of
using cancelable_wait(). Is there a good reason for this, or could this
be rewritten in terms of the latter?
I don't see a reason to stick to WFMO if using cancelable_wait allows
to extend the timer functions as you propose.
Ditto.

cgf

Loading...