diff options
Diffstat (limited to '')
-rw-r--r-- | poll/os2/poll.c | 3 | ||||
-rw-r--r-- | poll/os2/pollset.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/poll/os2/poll.c b/poll/os2/poll.c index 3c36e5e..a9d5153 100644 --- a/poll/os2/poll.c +++ b/poll/os2/poll.c @@ -61,7 +61,8 @@ APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num, } if (timeout > 0) { - timeout /= 1000; /* convert microseconds to milliseconds */ + /* convert microseconds to milliseconds (round up) */ + timeout = (timeout + 999) / 1000; } i = select(pollset, num_read, num_write, num_except, timeout); diff --git a/poll/os2/pollset.c b/poll/os2/pollset.c index 87b3c18..c032199 100644 --- a/poll/os2/pollset.c +++ b/poll/os2/pollset.c @@ -223,7 +223,7 @@ APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, (*num) = 0; if (timeout > 0) { - timeout /= 1000; + timeout = (timeout + 999) / 1000; } rv = select(pollresult, pollset->num_read, pollset->num_write, pollset->num_except, timeout); |