time: Don't apr_sleep() less than the requested time on WIN32.
Windows' Sleep() has millisecond granularity while the given apr_time_t to
sleep is in microseconds, so round up.
* time/win32/time.c(apr_sleep):
Round up given time to upper milliseconds.
@@ -268,7 +268,7 @@ APR_DECLARE(void) apr_sleep(apr_interval_time_t t)
/* One of the few sane situations for a cast, Sleep
* is in ms, not us, and passed as a DWORD value
*/
- Sleep((DWORD)(t / 1000));
+ Sleep((DWORD)((t + 999) / 1000));
}
static apr_status_t clock_restore(void *unsetres)
