Golang Client for ClockBound.
chronyd must be running in order to run ClockBoundD.
Rust and Cargo are required for building ClockBoundD. On Linux or another UNIX-like OS, run the following in your terminal.
curl https://sh.rustup.rs -sSf | sh
See Installation section on The Cargo Book for more detail.
You may need to also install gcc:
sudo yum install gcc
Run cargo install
and start ClockBoundD:
cargo install clock-bound-d
$HOME/.cargo/bin/clockboundd
If you want to daemonize ClockBoundD, see Systemd configuration.
Now, you can run the example using go run
command.
go run ./cmd/go-clockboundc-now
You will get the current system clock with a clock error bound.
2021/11/27 10:43:52 Synchronized
2021/11/27 10:43:52 Current: 2021-11-27 10:43:52.95958806 +0000 UTC
2021/11/27 10:43:52 Earliest: 2021-11-27 10:43:52.959488228 +0000 UTC
2021/11/27 10:43:52 Latest: 2021-11-27 10:43:52.959687892 +0000 UTC
2021/11/27 10:43:52 Range: 199.664µs