summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/selectmodule.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c
index d44e8de..0c9b9d9 100644
--- a/Modules/selectmodule.c
+++ b/Modules/selectmodule.c
@@ -1458,7 +1458,9 @@ pyepoll_poll(pyEpoll_Object *self, PyObject *args, PyObject *kwds)
return NULL;
}
else {
- timeout = (int)(dtimeout * 1000.0);
+ /* epoll_wait() has a resolution of 1 millisecond, round away from zero
+ to wait *at least* dtimeout seconds. */
+ timeout = (int)ceil(dtimeout * 1000.0);
}
if (maxevents == -1) {