show the details of ntp server, written in c++, using boost lib
ntpdetails.cpp | ||
readme.md |
ntpdetails
this is a program that allows you to view the details of an ntp server.
usage:
./ntpdetails -t=utcX <NTP server>
where -t=utcX
is your timezone, -t=utc-8
for America/Los_Angeles.
example (after compilation):
acheron ~/ntpdetails > ./ntpdetails time.google.com
Details of time.google.com
Time: 05:32:24 UTC
Date: 2024-11-19
Ping: 19.340 ms
acheron ~/ntpdetails > ./ntpdetails -t=utc-8 time.google.com
Details of time.google.com
Time (utc-8): 21:32:53
Date: 2024-11-18
Ping: 23.993 ms
how 2 compile????
clone git clone https://git.rintyuu.dev/rintyuu/ntpdetails.git
.
cd cd ntpdetails
.
install gcc libboost-dev libboost-system-dev libasio-dev
.
compile g++ -std=c++17 -o ntpdetails ntpdetails.cpp -lboost_system
.