pub enum ClockSource {
Unset,
Rtc,
Ntp,
Floor,
}Expand description
Where a wall-clock reading came from. Reported alongside the time so a displayed timestamp says what it is standing on: a local hardware clock, a network correction, or nothing (§26.4 - a fallback chain is mechanism while its choice is visible, and magic when it is not).
Variants§
Unset
No clock: no hardware RTC and nothing has set the time. date says so rather than inventing one.
Rtc
A local hardware real-time clock reading a plausible date.
Ntp
Set from the network (SNTP) this boot.
Floor
Started from the persisted floor (/system/services/time/floor) - no RTC on this board and no network sync yet.
A real reading and a distinct one: it is a LOWER BOUND carried over from the last boot, advancing
correctly since, but it cannot know how long the machine was powered off. Reporting it as Rtc
would claim hardware this board does not have, and as Unset would deny a time it is displaying.
Trait Implementations§
Source§impl Clone for ClockSource
impl Clone for ClockSource
Source§fn clone(&self) -> ClockSource
fn clone(&self) -> ClockSource
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl PartialEq for ClockSource
impl PartialEq for ClockSource
Source§fn eq(&self, other: &ClockSource) -> bool
fn eq(&self, other: &ClockSource) -> bool
self and other values to be equal, and is used by ==.