narupatools.core.timing¶
Code for managing timings.
Functions
Wait for a given predicate to evaluate to true. |
-
narupatools.core.timing.wait_for(predicate: Callable[[…], bool], *, timeout: float = 2, check_interval: float = 0.1) → None¶ Wait for a given predicate to evaluate to true.
- Parameters
predicate – Event to wait for.
timeout – Time to wait in seconds.
check_interval – Interval to check predicate in seconds.
- Raises
TimeoutError – Timeout is reached and the predicate hasn’t returned true.