remotivelabs.topology.time

Utilities for scheduling periodic callbacks.

remotivelabs.topology.time.async_ticker.create_ticker creates an asyncio.Task that calls a remotivelabs.topology.time.callback.OnTickCallback at a fixed interval. The ticker compensates for callback execution time to stay on schedule, and can be stopped by returning True from the callback or by cancelling the task.

 1"""
 2# Utilities for scheduling periodic callbacks.
 3
 4<!-- start-include -->
 5`remotivelabs.topology.time.async_ticker.create_ticker` creates an `asyncio.Task` that calls
 6a `remotivelabs.topology.time.callback.OnTickCallback` at a fixed interval. The ticker
 7compensates for callback execution time to stay on schedule, and can be stopped by returning
 8`True` from the callback or by cancelling the task.
 9<!-- end-include -->
10"""