View Source sntp (util v1.3.4)
Implements SNTP query logic. SNTP - Simple Network Time Protocol (RFC-2030).
Link to this section Summary
Functions
Query NTP time sources from "/etc/ntp.conf"
and return min/max/avg offset of current host from given time sources.
Query ServerAddress
NTP time sources and return min/max/avg offset of current host from given time sources.
Query ServerAddress
time source to find out server time and current host's offset from time source.
Return a list of default NTP time servers for this host.
Return a list of default NTP time servers for this host. If Resolve
is true, the list will contain IP addresses or else host names.
Link to this section Functions
-spec avg_time() -> {Min :: integer(), Max :: integer(), Avg :: integer()}.
Query NTP time sources from "/etc/ntp.conf"
and return min/max/avg offset of current host from given time sources.
See also: avg_time/1.
-spec avg_time([inet:ip_address()]) -> {Min :: integer(), Max :: integer(), Avg :: integer()}.
Query ServerAddress
NTP time sources and return min/max/avg offset of current host from given time sources.
-spec time(ServerAddress :: inet:ip_address()) -> #sntp{}.
Query ServerAddress
time source to find out server time and current host's offset from time source.
-spec time_servers() -> [inet:ip_address()].
Return a list of default NTP time servers for this host.
-spec time_servers(boolean()) -> [inet:ip_address()].
Return a list of default NTP time servers for this host. If Resolve
is true, the list will contain IP addresses or else host names.