[692] in linux-net channel archive

home help back first fref pref prev next nref lref last post

Re: Getting and setting time for client, how?

daemon@ATHENA.MIT.EDU (Rob Janssen reading Linux mailingl)
Sat Jul 15 05:30:50 1995

From: linux@pe1chl.ampr.org (Rob Janssen reading Linux mailinglist)
To: jonathan@DSG.Stanford.EDU (Jonathan Stone)
Date: Fri, 14 Jul 1995 23:42:11 +0200 (MET DST)
Cc: drew@poohsticks.org, linux-net@vger.rutgers.edu, GeisJ@rnd3.indy.tce.com
In-Reply-To: <199507131251.FAA00666@Pescadero.Stanford.EDU> from "Jonathan Stone" at Jul 13, 95 05:51:40 am
Reply-To: linux-vger@wab-tis.rabobank.nl

According to Jonathan Stone:
> I can appreciate the simplicity of using only one synchronization
> protocol on a network.  Otherwise I don't see much point at all in
> using xntpd (NTP is capable of long-term synchronization down to
> microseconds) when one only has a 100hz-resolution interrupt-driven
> clock, and one also lacks Dave Mills' phase-locked-loop clock
> discipline, and the associated ntp_adjtime() call.

What makes you think it can't be done with Linux?

> Is anyone working on high-resolution time for Linux -- e.g., with
> microsecond, tens-of-nanosecond resolution or better?  It's a great
> way to tune networking (and other) code, widely available in Unix
> workstation hardware; but I don't know of any widely-available
> high-resolution free-running clock hardware for x86s.  As far
> as I know, motherboards don't include them, as a rule.

Are you sure you know about the timer hardware on PC motherboards?
The timer chip on a PC ticks in increments of about 800ns.  The
gettimeofday() routine in Linux returns the current time with microsecond
resolution (determined by the return value type which is a historic
situation and could better have been seconds+nanoseconds instead of
the seconds+microseconds that I think has been introduced by BSD)

With proper kernel patches it is possible to PLL this clock to a
pulse-per-second receiver that receives one of the time standard transmitters
available on Longwave or Shortwave.
I keep my clock within about 20us (day) or 200us (night) jitter from
one of these time standard signals.  The jitter is caused mostly by
propagation effects, I think.
(I have sent the patches to Linus but they don't appear in the kernel
for some reason unknown to me)

Rob

-- 
+------------------------------------+--------------------------------------+
| Rob Janssen         rob@knoware.nl | AMPRnet:   rob@pe1chl.ampr.org       |
| e-mail: pe1chl@wab-tis.rabobank.nl | AX.25 BBS: PE1CHL@PI8WNO.#UTR.NLD.EU |
+------------------------------------+--------------------------------------+

home help back first fref pref prev next nref lref last post