diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a868a00a5..6015c4251 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-03-28 Christopher Faylor + + * timer.cc (timer_tracker::settime): Set times to zero when just + cancelling a timer. + 2005-03-28 Christopher Faylor * cygthread.cc (cygthread::detach): Revert to just waiting for thred diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc index 60149bad4..746362779 100644 --- a/winsup/cygwin/timer.cc +++ b/winsup/cygwin/timer.cc @@ -230,7 +230,9 @@ timer_tracker::settime (int in_flags, const itimerspec *value, itimerspec *ovalu if (ovalue) gettime (ovalue); - if (value->it_value.tv_sec || value->it_value.tv_nsec) + if (!value->it_value.tv_sec && !value->it_value.tv_nsec) + interval_us = sleepto_us = 0; + else { sleepto_us = now + to_us (value->it_value); interval_us = to_us (value->it_interval);