-"""
-Timer for asyncio.
-"""
+"""Timer for asyncio."""
import asyncio
callback_args=(),
callback_kwargs=None,
):
- """An asynchronous Timer object.
+ """
+ An asynchronous Timer object.
Parameters
- -----------
+ ----------
timeout: :class:`float`:
The duration for which the timer should last.
self._callback(*self._callback_args, **self._callback_kwargs)
def cancel(self):
- """
- Cancels the timer. The callback will not be called.
- """
+ """Cancels the timer. The callback will not be called."""
self._task.cancel()