Hi Ralph, 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 which returns.... associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync, version="ntpd [email protected] Jul 06 19:25:05.01 (UTC+08:00) 2012 (3)", 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, tc=3, mintc=3, offset=-2.315, frequency=0.612, sys_jitter=1.090, clk_jitter=1.770, clk_wander=0.250 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 millisecs). hope this helps. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Ralph Aichinger Sent: Sunday, 26 August 2012 3:08 AM To: [email protected] Subject: Re: [ntp:questions] Visual clock display? Chris Albertson <[email protected]> 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 at > about 60 to 100 Hz. I think LCDs have something like this too. You can > 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. /ralph _______________________________________________ questions mailing list [email protected] http://lists.ntp.org/listinfo/questions _______________________________________________ questions mailing list [email protected] http://lists.ntp.org/listinfo/questions
