#cli #time

app clock-check

A tool for getting your system clock precision

7 releases

0.3.0 Mar 5, 2023
0.2.0 Feb 28, 2023
0.1.2 Feb 28, 2023
0.1.1 Feb 26, 2023
0.1.0 Feb 26, 2023

#801 in Command line utilities

MIT license

135 lines

Time server CLI

This is a simple command-line interface to the time server.

Warning: This is a work in progress.


cargo install clock-check


Usage: clock-check [OPTIONS]

  -s, --server <SERVER>     The URL of the time server [default: http://localhost:8000/time]
  -b, --bare                Only output the server unix server time
      --seconds             Use seconds instead of milliseconds
  -t, --timeout <TIMEOUT>   A timeout in milliseconds [default: 1000]
  -l, --latency-in-account  Try to account for network latency. This is not very accurate and should be considered experimental
  -u, --use-ntp             Use NTP to get the time instead of a time server (experimental). This will use time.cloudflare.com:123 by default, but you can specify a different server with the --server flag
  -h, --help                Print help
  -V, --version             Print version


~1M SLoC