From ff9883c921fcb1bbf21e19f7a739e00b0c74da68 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Sun, 26 Jun 2022 12:50:54 +0000 Subject: 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 --- time/unix/time.c | 4 ++-- 1 file 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; -- cgit v1.2.1