jacdac.real_time_clock

Submodules

Package Contents

Classes

RealTimeClockClient

Real time clock to support collecting data with precise time stamps.

class jacdac.real_time_clock.RealTimeClockClient(bus: jacdac.bus.Bus, role: str, *, missing_local_time_value: Tuple[int, int, int, int, int, int, int] | None = None)

Bases: jacdac.bus.SensorClient

Real time clock to support collecting data with precise time stamps. Implements a client for the Real time clock service.

property local_time: Tuple[int, int, int, int, int, int, int] | None

Current time in 24h representation. Default streaming period is 1 second.

  • day_of_month is day of the month, starting at 1

  • day_of_week is day of the week, starting at 1 as monday. Leave at 0 if unsupported.,

property drift: float | None

(Optional) Time drift since the last call to the set_time command., _: s

property precision: float | None

(Optional) Error on the clock, in parts per million of seconds., _: ppm

property variant: jacdac.real_time_clock.constants.RealTimeClockVariant | None

(Optional) The type of physical clock used by the sensor.,

set_time(year: int, month: int, day_of_month: int, day_of_week: int, hour: int, min: int, sec: int) None

Sets the current time and resets the error.