Crate hermit_time

Crate hermit_time 

Expand description

Hermit time manager.

The time manager is responsible for keeping the system time in sync. It mainly uses NTP to do so.

The time manager also uses a file to store the system time across reboots. This time is not considered valid, but at least it helps to avoid the system time to be reset to the Unix epoch.

ยงConfiguration

The time manager accepts a list of file paths to search for valid configuration files. The first valid configuration file found is used. The configuration file format is TOML and is structured as follows:

# required: list of NTP servers to use
ntp_peers = ["time.aws.com"]

# optional: interval between NTP syncs. Defaults to 15 minutes.
ntp_interval = "15m"
# optional: interval between NTP sync retries. Defaults to 30 seconds.
ntp_retry_interval = "30s"

Modulesยง

config ๐Ÿ”’
fs_clock ๐Ÿ”’
ntpd ๐Ÿ”’
status ๐Ÿ”’

Structsยง

TimeManager ๐Ÿ”’
TimeManagerHandle
Handle to the time manager.

Enumsยง

Command ๐Ÿ”’

Constantsยง

CMD_CHANNEL_SIZE ๐Ÿ”’

Functionsยง

spawn
Spawns a new time manager and returns the handle to it.