aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2015-12-23 15:03:40 +0100
committerMarc Hoersken <info@marc-hoersken.de>2015-12-23 15:03:40 +0100
commit520bd9e49f7f4f65c39ef12090220863bb02b111 (patch)
tree6cec61f7245afe11be4a688187678923b9ec5ae0
parent24cf20ec6842603a19dfda9d4169534b92e51ab5 (diff)
tests first.c: fix calculation of sleep timeout on Windows
Not converting to double caused small timeouts to be skipped.
-rw-r--r--tests/libtest/first.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c
index d693173f1..79c73fda7 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