aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2015-12-23 15:04:02 +0100
committerMarc Hoersken <info@marc-hoersken.de>2015-12-23 15:04:02 +0100
commit7bf5f6e0549db74973447ee8b26de589971fb2b8 (patch)
treee0d05d08c1902f49f1fac64c7d909a1765ebaa33
parent520bd9e49f7f4f65c39ef12090220863bb02b111 (diff)
sockfilt.c: fix calculation of sleep timeout on Windows
Not converting to double caused small timeouts to be skipped.
-rw-r--r--tests/server/sockfilt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index cf090cafb..3c549997d 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -696,7 +696,7 @@ static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
/* check if we got descriptors, sleep in case we got none */
if(!nfds) {
- Sleep((timeout->tv_sec * 1000) + (timeout->tv_usec / 1000));
+ Sleep((timeout->tv_sec*1000)+(DWORD)(((double)timeout->tv_usec)/1000.0));
return 0;
}