repositorypackage
0.1.1
Repository: https://github.com/shogo82148/go-clockboundc.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# README
go-clockboundc
Golang Client for ClockBound.
Run the example
Prerequisites
chronyd must be running in order to run ClockBoundD.
Install Rust and Cargo
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.
Install GCC
You may need to also install gcc:
sudo yum install gcc
Install ClockBoundD
Run cargo install
and start ClockBoundD:
cargo install clock-bound-d
$HOME/.cargo/bin/clockboundd
If you want to daemonize ClockBoundD, see Systemd configuration.
Run
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