aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-06-26 22:33:54 +0000
committerChristopher Faylor <me@cgf.cx>2000-06-26 22:33:54 +0000
commit5b082caa62af881af4f0ae6f119d971c50e7f7f4 (patch)
tree210a8bcdb75686595a80ae0ad495a9d3186695ae
parent9cef3cc0d7af7f305df62af6d562d402ebe5398b (diff)
downloadnewlib-5b082caa62af881af4f0ae6f119d971c50e7f7f4.zip
newlib-5b082caa62af881af4f0ae6f119d971c50e7f7f4.tar.gz
newlib-5b082caa62af881af4f0ae6f119d971c50e7f7f4.tar.bz2
* windows.cc (setitimer): Round up when < 1000 usecs.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/window.cc5
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index dcfee80..85a033c 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jun 26 18:32:41 2000 Christopher Faylor <cgf@cygnus.com>
+
+ * windows.cc (setitimer): Round up when < 1000 usecs.
+
Mon Jun 26 17:34:54 2000 Christopher Faylor <cgf@cygnus.com>
* hinfo.cc (hinfo::dup2): Eliminate compiler warning.
diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc
index 6651ddc..ad7ac40 100644
--- a/winsup/cygwin/window.cc
+++ b/winsup/cygwin/window.cc
@@ -176,7 +176,10 @@ setitimer (int which, const struct itimerval *value, struct itimerval *oldvalue)
itv = *value;
elapse = itv.it_value.tv_sec * 1000 + itv.it_value.tv_usec / 1000;
if (elapse == 0)
- return 0;
+ if (itv.it_value.tv_usec)
+ elapse = 1;
+ else
+ return 0;
if (!(timer_active = SetTimer (gethwnd(), 1, elapse, NULL)))
{
__seterrno ();