mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #20311: asyncio: Add a granularity attribute to BaseEventLoop: maximum
between the resolution of the BaseEventLoop.time() method and the resolution of the selector. The granuarility is used in the scheduler to round time and deadline.
This commit is contained in:
parent
635fca9704
commit
f67255ab94
6 changed files with 44 additions and 1 deletions
|
@ -144,6 +144,12 @@ a different clock than :func:`time.time`.
|
|||
Return the current time, as a :class:`float` value, according to the
|
||||
event loop's internal clock.
|
||||
|
||||
.. attribute:: BaseEventLoop.granularity
|
||||
|
||||
Granularity of the time: maximum between the resolution of the
|
||||
:meth:`BaseEventLoop.time` method and the resolution of the selector (see
|
||||
:attr:`selectors.BaseSelector.resolution`).
|
||||
|
||||
.. seealso::
|
||||
|
||||
The :func:`asyncio.sleep` function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue