From: simonmar Date: Wed, 3 Sep 2003 10:49:19 +0000 (+0000) Subject: [project @ 2003-09-03 10:49:19 by simonmar] X-Git-Tag: nhc98-1-18-release~517 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=d13151cc971aaa7400de7c400ad050e8f8fd7a8d;p=haskell-directory.git [project @ 2003-09-03 10:49:19 by simonmar] inputReady(): the time calculation for select() was wrong, forgetting to multiply the milliseconds value by 1000 to get microseconds. --- diff --git a/cbits/inputReady.c b/cbits/inputReady.c index 8677f26..30e140b 100644 --- a/cbits/inputReady.c +++ b/cbits/inputReady.c @@ -34,7 +34,7 @@ inputReady(int fd, int msecs, int isSock) */ maxfd = fd + 1; tv.tv_sec = msecs / 1000; - tv.tv_usec = msecs % 1000; + tv.tv_usec = (msecs % 1000) * 1000; while ((ready = select(maxfd, &rfd, NULL, NULL, &tv)) < 0 ) { if (errno != EINTR ) {