Expand description
A device abstraction that combines NTP time synchronization with a local clock.
This module provides platform-independent types and logic for ClockSync
and a concrete runtime implementation re-exported by platform crates.
For a complete usage example see the platform crate’s clock_sync module
(for example device_envoy_rp::clock_sync or device_envoy_esp::clock_sync).
The shared trait, time types, constants, and helpers are available on every
platform. The NTP-backed runtime implementation is enabled by the wifi
feature.
Structs§
- Clock
Sync Tick - Tick event emitted by
ClockSync. - Unix
Seconds - Units-safe wrapper for Unix timestamps (seconds since 1970-01-01 00:00:00 UTC).
Constants§
- ONE_DAY
- Duration representing one day (24 hours).
- ONE_
MINUTE - Duration representing one minute (60 seconds).
- ONE_
SECOND - Duration representing one second.
Traits§
- Clock
Sync - Platform-agnostic ClockSync operation contract.
Functions§
- h12_m_s
- Extract hour (12-hour format), minute, and second from an
OffsetDateTime.