- Overview
- check_clock
check_clock
Part of Reusable workflows in the Python API reference.
Related guidance: shipped-tooling.
Runnable examples: check_clock.py.
from picogrid_ecn_client.workflows import check_clockMeasure ECN-relative clock offset and optionally enforce a maximum offset.
async def check_clock( client: ECNClient, *, samples: int = 3, timeout: float | None = None, max_offset_seconds: float | None = None,) -> CheckClockResultParameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
| client | ECNClient | — | Configured SDK client whose clock endpoint will be queried. |
| samples | int | 3 | Number of valid NTP samples to collect. |
| timeout | float | None | None | Optional total measurement timeout in seconds. |
| max_offset_seconds | float | None | None | Optional maximum permitted absolute offset in seconds. |
Returns
Section titled “Returns”| Type | Description |
|---|---|
| CheckClockResult | The typed clock measurement result. |
Raises
Section titled “Raises”| Exception | Description |
|---|---|
| ClockError | If the measurement fails. |
| ClockToleranceError | If max_offset_seconds is exceeded. |
| ValidationError | If a numeric argument is outside its supported range. |
Version 0.2.0 · branch main
