The callback iteration slowly drifts a few milliseconds per call This is due to inaccuracies of time.sleep and some overhead on the _run_callback method
This fix the issue by using sched.enterabs instead of sched.enter. This time to enter is always calculated based on the start timestamp of the callback
There will still be some milliseconds variation from execution to execution, but it will never drift.
The callback iteration slowly drifts a few milliseconds per call This is due to inaccuracies of time.sleep and some overhead on the
_run_callback
methodThis fix the issue by using sched.enterabs instead of sched.enter. This time to enter is always calculated based on the start timestamp of the callback
There will still be some milliseconds variation from execution to execution, but it will never drift.