diff options
author | Christopher Faylor <me@cgf.cx> | 2005-03-28 23:55:59 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-03-28 23:55:59 +0400 |
commit | c6a756867090aaec26a75ccca8ccadf1aa142e9e (patch) | |
tree | 7771d175b2ec9c7f723382ef72d5026d05a03310 /winsup/cygwin/timer.cc | |
parent | dc000a838679572cba87587a7548d8fce4c44aa9 (diff) |
* timer.cc (timer_tracker::settime): Set times to zero when just cancelling a
timer.
Diffstat (limited to 'winsup/cygwin/timer.cc')
-rw-r--r-- | winsup/cygwin/timer.cc | 4 |
1 files changed, 3 insertions, 1 deletions
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); |