@@ -221,7 +221,7 @@ select_select(PyObject *self, PyObject *args)
221221 return NULL ;
222222 }
223223
224- if (_PyTime_AsTimeval (timeout , & tv , _PyTime_ROUND_UP ) == -1 )
224+ if (_PyTime_AsTimeval (timeout , & tv , _PyTime_ROUND_CEILING ) == -1 )
225225 return NULL ;
226226 if (tv .tv_sec < 0 ) {
227227 PyErr_SetString (PyExc_ValueError , "timeout must be non-negative" );
@@ -282,7 +282,7 @@ select_select(PyObject *self, PyObject *args)
282282 n = 0 ;
283283 break ;
284284 }
285- _PyTime_AsTimeval_noraise (timeout , & tv , _PyTime_ROUND_UP );
285+ _PyTime_AsTimeval_noraise (timeout , & tv , _PyTime_ROUND_CEILING );
286286 /* retry select() with the recomputed timeout */
287287 }
288288 } while (1 );
@@ -594,7 +594,7 @@ poll_poll(pollObject *self, PyObject *args)
594594 poll_result = 0 ;
595595 break ;
596596 }
597- ms = _PyTime_AsMilliseconds (timeout , _PyTime_ROUND_UP );
597+ ms = _PyTime_AsMilliseconds (timeout , _PyTime_ROUND_CEILING );
598598 /* retry poll() with the recomputed timeout */
599599 }
600600 } while (1 );
@@ -941,7 +941,7 @@ devpoll_poll(devpollObject *self, PyObject *args)
941941 poll_result = 0 ;
942942 break ;
943943 }
944- ms = _PyTime_AsMilliseconds (timeout , _PyTime_ROUND_UP );
944+ ms = _PyTime_AsMilliseconds (timeout , _PyTime_ROUND_CEILING );
945945 dvp .dp_timeout = (int )ms ;
946946 /* retry devpoll() with the recomputed timeout */
947947 }
0 commit comments