|
|
|
|
|
by mkl
525 days ago
|
|
There's still a delay with that, as date takes time to run. You need a program that gets the current time, waits an appropriate amount, prints, and repeats. It'll still be slightly off unless you can measure the printing and flow control accurately. I have a program I use in shell scripting called sleepuntil that does something like this, but it doesn't try to be millisecond-accurate. |
|
So I figured you need a time "diff", a single command that updates from both timeservers and then presents the offset in a single operation. So (I just researched this again and) there's three answers here [0], using ntpdate and something I've never seen before called clockdiff.
[0] https://stackoverflow.com/questions/2296981/how-can-i-work-o...