ShotTimer
- class caqtus.experiment_control.sequence_execution.ShotTimer(*args: object, **kwargs: object)
Bases:
objectGives access to pseudo-real time primitives during a shot.
It gives the possibility to react at specific times during a shot.
All times are relative to the start of the shot and are in seconds.
- async wait_until(target_time: float) float
Waits until a target time is reached.
- Parameters:
target_time – The target time relative to the start of the shot. The target time can be in the past, in which case the function will return immediately.
- Returns:
The duration waited for the target time to be reached. This duration is positive if the target time is in the future at the moment of the call. This duration is negative if the target time is in the past at the moment of the call.
- Raises:
ValueError – If the target time is negative.
Warning
This function is not guaranteed to be precise. Its accuracy depends on the underlying operating system and the event loop load.