Runs the ``callback`` after ``delay`` seconds have passed. Returns an opaque handle that may be passed to `remove_timeout` to cancel. Note that unlike the `asyncio` method of the same name, the returned object does not have a ``cancel()`` method. See `add_timeout`
(
self, delay: float, callback: Callable[..., None], *args: Any, **kwargs: Any
)
| 587 | raise TypeError("Unsupported deadline %r" % deadline) |
| 588 | |
| 589 | def call_later( |
| 590 | self, delay: float, callback: Callable[..., None], *args: Any, **kwargs: Any |
| 591 | ) -> object: |
| 592 | """Runs the ``callback`` after ``delay`` seconds have passed. |
| 593 | |
| 594 | Returns an opaque handle that may be passed to `remove_timeout` |
| 595 | to cancel. Note that unlike the `asyncio` method of the same |
| 596 | name, the returned object does not have a ``cancel()`` method. |
| 597 | |
| 598 | See `add_timeout` for comments on thread-safety and subclassing. |
| 599 | |
| 600 | .. versionadded:: 4.0 |
| 601 | """ |
| 602 | return self.call_at(self.time() + delay, callback, *args, **kwargs) |
| 603 | |
| 604 | def call_at( |
| 605 | self, when: float, callback: Callable[..., None], *args: Any, **kwargs: Any |