From 5b082caa62af881af4f0ae6f119d971c50e7f7f4 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 26 Jun 2000 22:33:54 +0000 Subject: * windows.cc (setitimer): Round up when < 1000 usecs. --- winsup/cygwin/window.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/window.cc') diff --git a/winsup/cygwin/window.cc b/winsup/cygwin/window.cc index 6651ddc54..ad7ac4018 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 (); -- cgit v1.2.3