Expand description
SNTP time synchronization client.
Provides a safe Rust API for the oveRTOS SNTP subsystem. A single NTP query is sent to a time server and the resulting UTC offset is stored internally. Useful for wall-clock timestamps, TLS certificate validation, and log correlation.
§Example
ⓘ
use ove::net_sntp;
let cfg = net_sntp::Config {
server: b"pool.ntp.org\0",
timeout_ms: 5000,
};
net_sntp::sync(&cfg).unwrap();
let utc = net_sntp::get_utc().unwrap();Structs§
- Config
- SNTP client configuration.
Functions§
- get_
offset_ us - Get the UTC offset computed by the last successful sync.
- get_utc
- Get the current UTC time in seconds since Unix epoch.
- sync
- Synchronize with an NTP server.