Schedule the timeout at absolute time. Like timeout() but argument gives absolute time in the same clock system as loop.time(). Please note: it is not POSIX time but a time with undefined starting base, e.g. the time of the system power on. >>> async with asyncio.timeout_at(lo
(when: float | None)
| 161 | |
| 162 | |
| 163 | def timeout_at(when: float | None) -> Timeout: |
| 164 | """Schedule the timeout at absolute time. |
| 165 | |
| 166 | Like timeout() but argument gives absolute time in the same clock system |
| 167 | as loop.time(). |
| 168 | |
| 169 | Please note: it is not POSIX time but a time with |
| 170 | undefined starting base, e.g. the time of the system power on. |
| 171 | |
| 172 | >>> async with asyncio.timeout_at(loop.time() + 10): |
| 173 | ... await long_running_task() |
| 174 | |
| 175 | |
| 176 | when - a deadline when timeout occurs or None to disable timeout logic |
| 177 | |
| 178 | long_running_task() is interrupted by raising asyncio.CancelledError, |
| 179 | the top-most affected timeout() context manager converts CancelledError |
| 180 | into TimeoutError. |
| 181 | """ |
| 182 | return Timeout(when) |
nothing calls this directly
no test coverage detected
searching dependent graphs…