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, *args: Any, **kwargs: Any
)
| 602 | raise TypeError("Unsupported deadline %r" % deadline) |
| 603 | |
| 604 | def call_later( |
| 605 | self, delay: float, callback: Callable, *args: Any, **kwargs: Any |
| 606 | ) -> object: |
| 607 | """Runs the ``callback`` after ``delay`` seconds have passed. |
| 608 | |
| 609 | Returns an opaque handle that may be passed to `remove_timeout` |
| 610 | to cancel. Note that unlike the `asyncio` method of the same |
| 611 | name, the returned object does not have a ``cancel()`` method. |
| 612 | |
| 613 | See `add_timeout` for comments on thread-safety and subclassing. |
| 614 | |
| 615 | .. versionadded:: 4.0 |
| 616 | """ |
| 617 | return self.call_at(self.time() + delay, callback, *args, **kwargs) |
| 618 | |
| 619 | def call_at( |
| 620 | self, when: float, callback: Callable, *args: Any, **kwargs: Any |