-"""
-Timer for asyncio.
-"""
+"""Timer for asyncio."""
import asyncio
"""An asynchronous Timer object.
Parameters
- -----------
+ ----------
timeout: :class:`float`:
The duration for which the timer should last.
callback_kwargs: Optional[:class:`dict`]:
The kwargs to be passed to the callback.
+
"""
self._timeout = timeout
self._repeat = repeat
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()