]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tests first.c: fix calculation of sleep timeout on Windows
authorMarc Hoersken <info@marc-hoersken.de>
Wed, 23 Dec 2015 14:03:40 +0000 (15:03 +0100)
committerMarc Hoersken <info@marc-hoersken.de>
Wed, 23 Dec 2015 14:03:40 +0000 (15:03 +0100)
Not converting to double caused small timeouts to be skipped.

tests/libtest/first.c

index d693173f181f05fdf6e9d58c42dfe4b95884d174..79c73fda739d8122f95bea81aadaeffd80969543 100644 (file)
@@ -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