Lines Matching defs:timeout

228     timeout as timeout_obj: object = None
242 The optional 4th argument specifies a timeout in seconds; it may be
278 _PyTime_t timeout, deadline = 0;
283 if (_PyTime_FromSecondsObject(&timeout, timeout_obj,
287 "timeout must be a float or None");
292 if (_PyTime_AsTimeval(timeout, &tv, _PyTime_ROUND_TIMEOUT) == -1)
295 PyErr_SetString(PyExc_ValueError, "timeout must be non-negative");
332 deadline = _PyDeadline_Init(timeout);
354 timeout = _PyDeadline_Get(deadline);
355 if (timeout < 0) {
363 _PyTime_AsTimeval_clamp(timeout, &tv, _PyTime_ROUND_CEILING);
364 /* retry select() with the recomputed timeout */
582 timeout as timeout_obj: object = None
600 _PyTime_t timeout = -1, ms = -1, deadline = 0;
604 if (_PyTime_FromMillisecondsObject(&timeout, timeout_obj,
608 "timeout must be an integer or None");
613 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_TIMEOUT);
615 PyErr_SetString(PyExc_OverflowError, "timeout is too large");
619 if (timeout >= 0) {
620 deadline = _PyDeadline_Init(timeout);
624 /* On some OSes, typically BSD-based ones, the timeout parameter of the
666 if (timeout >= 0) {
667 timeout = _PyDeadline_Get(deadline);
668 if (timeout < 0) {
672 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
673 /* retry poll() with the recomputed timeout */
908 timeout as timeout_obj: object = None
927 _PyTime_t timeout, ms, deadline = 0;
932 /* Check values for timeout */
934 timeout = -1;
938 if (_PyTime_FromMillisecondsObject(&timeout, timeout_obj,
942 "timeout must be an integer or None");
947 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_TIMEOUT);
949 PyErr_SetString(PyExc_OverflowError, "timeout is too large");
961 if (timeout >= 0) {
962 deadline = _PyDeadline_Init(timeout);
979 if (timeout >= 0) {
980 timeout = _PyDeadline_Get(deadline);
981 if (timeout < 0) {
985 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
987 /* retry devpoll() with the recomputed timeout */
1520 timeout as timeout_obj: object = None
1522 a timeout of None or -1 makes poll wait indefinitely
1540 _PyTime_t timeout = -1, ms = -1, deadline = 0;
1547 infinity to wait at least timeout seconds. */
1548 if (_PyTime_FromSecondsObject(&timeout, timeout_obj,
1552 "timeout must be an integer or None");
1557 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
1559 PyErr_SetString(PyExc_OverflowError, "timeout is too large");
1563 for the timeout argument, but -1 is the documented way to block
1573 if (timeout >= 0) {
1574 deadline = _PyDeadline_Init(timeout);
1607 if (timeout >= 0) {
1608 timeout = _PyDeadline_Get(deadline);
1609 if (timeout < 0) {
1613 ms = _PyTime_AsMilliseconds(timeout, _PyTime_ROUND_CEILING);
1614 /* retry epoll_wait() with the recomputed timeout */
2097 timeout as otimeout: object = None
2119 _PyTime_t timeout, deadline = 0;
2136 if (_PyTime_FromSecondsObject(&timeout,
2139 "timeout argument must be a number "
2145 if (_PyTime_AsTimespec(timeout, &timeoutspec) == -1)
2150 "timeout must be positive or None");
2197 deadline = _PyDeadline_Init(timeout);
2215 timeout = _PyDeadline_Get(deadline);
2216 if (timeout < 0) {
2220 if (_PyTime_AsTimespec(timeout, &timeoutspec) == -1)
2222 /* retry kevent() with the recomputed timeout */