Simple Rust NTP client
This crate provides a method for sending requests to NTP servers and process responses, extracting received timestamp
Documentation
Installation
This crate works with Cargo and is on
crates.io. Add it to your Cargo.toml
like so:
[]
= "0.2"
By calling the request() method and providing a proper NTP pool or server you
should get a valid synchronization timestamp:
use sntpc;
let result = request;
if let Ok = result
Lightweight system time synchronization
The sntpc crate contains the timesync application that may sync system
time with the given NTP server
Command-line options
USAGE:
timesync [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-p, --port <port> NTP server port [default: 123]
-s, --server <server> NTP server hostname [default: time.google.com]
This is the output of timesync -h.