summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c
index fa96d417d1..15c6020dc8 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2960,7 +2960,7 @@ rb_w32_select_with_thread(int nfds, fd_set *rd, fd_set *wr, fd_set *ex,
if (!rb_w32_time_subtract(&rest, &now)) break;
if (compare(&rest, &wait) < 0) dowait = &rest;
}
- Sleep(dowait->tv_sec * 1000 + dowait->tv_usec / 1000);
+ Sleep(dowait->tv_sec * 1000 + (dowait->tv_usec + 999) / 1000);
}
}
}