diff options
author | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2022-06-26 12:50:54 +0000 |
---|---|---|
committer | ylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68> | 2022-06-26 12:50:54 +0000 |
commit | ccddc35286ab21df383e0782f4e19db9d44956d6 (patch) | |
tree | 7e3ef3fc42b4f9de4349231260debb2fc7a80ae8 | |
parent | e8f906881af6da1b84ce55ae2394c419337a813f (diff) | |
download | libapr-ccddc35286ab21df383e0782f4e19db9d44956d6.tar.gz |
time: Don't apr_sleep() less than the requested time on OS2/Netware.
Round to upper milliseconds when converting from microseconds.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902263 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | time/unix/time.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/time/unix/time.c b/time/unix/time.c index 509a78dbb..0a9377f55 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -237,11 +237,11 @@ APR_DECLARE(apr_status_t) apr_os_exp_time_put(apr_time_exp_t *aprtime, APR_DECLARE(void) apr_sleep(apr_interval_time_t t) { #ifdef OS2 - DosSleep(t/1000); + DosSleep((t + 999) / 1000); #elif defined(BEOS) snooze(t); #elif defined(NETWARE) - delay(t/1000); + delay((t + 999) / 1000); #elif defined(HAVE_NANOSLEEP) struct timespec ts; ts.tv_sec = t / APR_USEC_PER_SEC; |