Implement TimerHandle.when() (#5473)

This commit is contained in:
Andrew Svetlov 2018-02-01 19:59:32 +02:00 committed by GitHub
parent 83ab995871
commit 3d4dbd8f01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 4 deletions

View file

@ -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()."""