libstp.timing.synchronizer¶
Classes¶
Mission-relative clock used by checkpoint-aware timing steps. |
Module Contents¶
- class libstp.timing.synchronizer.Synchronizer¶
Mission-relative clock used by checkpoint-aware timing steps.
- start_time = None¶
- start_recording()¶
Capture the current event-loop time as checkpoint zero.
- get_time()¶
Return seconds elapsed since
start_recording()was called.
- async wait_until_checkpoint(checkpoint_seconds)¶
Sleep until the mission-relative checkpoint or log that it was missed.
- async do_until_checkpoint(checkpoint_seconds, func, *args, **kwargs)¶
Execute a function until the specified checkpoint is reached.
- Parameters:
checkpoint_seconds – The time in seconds to wait until the checkpoint.
func – The function to execute.
*args – Positional arguments for the function.
**kwargs – Keyword arguments for the function.