mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Implement TimerHandle.when() (#5473)
This commit is contained in:
parent
83ab995871
commit
3d4dbd8f01
4 changed files with 34 additions and 4 deletions
|
@ -156,6 +156,14 @@ class TimerHandle(Handle):
|
|||
self._loop._timer_handle_cancelled(self)
|
||||
super().cancel()
|
||||
|
||||
def when(self):
|
||||
"""Return a scheduled callback time.
|
||||
|
||||
The time is an absolute timestamp, using the same time
|
||||
reference as loop.time().
|
||||
"""
|
||||
return self._when
|
||||
|
||||
|
||||
class AbstractServer:
|
||||
"""Abstract server returned by create_server()."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue