From: Marc Hoersken Date: Wed, 23 Dec 2015 14:03:40 +0000 (+0100) Subject: tests first.c: fix calculation of sleep timeout on Windows X-Git-Tag: curl-7_47_0~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=520bd9e49f7f4f65c39ef12090220863bb02b111;p=thirdparty%2Fcurl.git tests first.c: fix calculation of sleep timeout on Windows Not converting to double caused small timeouts to be skipped. --- diff --git a/tests/libtest/first.c b/tests/libtest/first.c index d693173f18..79c73fda73 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -56,7 +56,7 @@ int select_wrapper(int nfds, fd_set *rd, fd_set *wr, fd_set *exc, * select() can not be used to sleep without a single fd_set. */ if(!nfds) { - Sleep(1000*tv->tv_sec + tv->tv_usec/1000); + Sleep((1000*tv->tv_sec) + (DWORD)(((double)tv->tv_usec)/1000.0)); return 0; } #endif