[ntp:questions] Visual clock display?
P.Kennedy at fugro.com.au
Mon Aug 27 02:31:43 UTC 2012
NTP is designed to synch your PC clock to UTC. If it is doing its job
correctly, your PC clock time == utc time, so any software displaying
time will do the trick.
If you would like to get hold of NTP's best estimate of time, I would
recommend the ntpq qc tool.
ntpq -c rv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.6p5 at 1.2349-o Jul 06 19:25:05.01 (UTC+08:00) 2012
processor="x86", system="Windows", leap=00, stratum=2, precision=-10,
rootdelay=0.140, rootdisp=8.054, refid=172.23.21.9,
reftime=d3e55814.b925fac3 Mon, Aug 27 2012 10:21:08.723,
clock=d3e55836.1ba456d8 Mon, Aug 27 2012 10:21:42.107, peer=54235,
mintc=3, offset=-2.315, frequency=0.612, sys_jitter=1.090,
Just parse the output from ntpq and you have what you seek.
The entry 'clock=....' is the one you are after, so my current time is
Mon, Aug 27 2012 10:21:42.107.
However, there is not a clock on the planet that is perfectly correct
(as far as I know), so if you want to be pedantic, you should also parse
out the 'offset=xxx' and report this as the estimate of accuracy (in
hope this helps.
From: questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org
[mailto:questions-bounces+p.kennedy=fugro.com.au at lists.ntp.org] On
Behalf Of Ralph Aichinger
Sent: Sunday, 26 August 2012 3:08 AM
To: questions at lists.ntp.org
Subject: Re: [ntp:questions] Visual clock display?
Chris Albertson <albertson.chris at gmail.com> wrote:
> The limit of accuracy of the visual clock is the refresh rate of the
> monitor. One the old CRT monitors there was a vertical sync that ran
> about 60 to 100 Hz. I think LCDs have something like this too. You
> do better than 100 mSec using your method. In fact it can approach
> the vertical sync limit.
100ms is just fine for me, I think. I don't know how much the console
driver or a GUI layer adds.
> The system can do better timing but the 100 Hz (or so) screen refresh
> is the limit. Actully you eyes can't see a change that is faster than
> about maybe about 30 mSec. But you CAN see 100 mSec ticks. Run your
> update loop at 100Hz and you will be fine
Is there an "official" program that displays the time of the ntpd
process? Or is one supposed to get time for uses like this from the
system clock? Not that I think it makes a difference with 100ms
accuracy, but as a matter of principle it would interest me.
questions mailing list
questions at lists.ntp.org
More information about the questions