RTC precision?

Jeffrey L Bromberger jeffrey at sci.ccny.cuny.edu
Fri Mar 1 03:09:50 AEST 1991


In article <12768 at helios.TAMU.EDU> dlb5404 at tamuts.tamu.edu (Daryl Biberdorf) writes:
>In article <1991Feb27.195148.4122 at sci.ccny.cuny.edu> jeffrey at sci.ccny.cuny.edu (Jeffrey L Bromberger) writes:
>>[stuff about usecs.]
>
>I know that the gettimeofday() call modifies one of the two structures
>passed to it to contain both seconds and microseconds.  If this is a
>BSD thing (and I think it is), has anyone written anything similar
>for the 3b1/System V world?

For my self-assigned task of porting over the BSD timed (time control
daemon), I wrote gettimeofday, setttimeofday, and I am beating on
adjtime.  That's great for up-to-one-second control.  But it's a
bummer being only able to adjust time to the next second.  Is the
Toshiba RTC chip common enough for anyone to know anything about it?
Maybe the RTC doesn't know that much, but does the 68010?
BTW: which clock is the one that gets carried away, the RTC or the
software clock?

Another thing that seems fishy regarding the WIN/TCP software.   Timed
uses ethernet ICMP TIMESTAMP packets to tell how far apart the system
clocks are.  Well, when you do that for any machine on our local
network, you get:
% repeat 10 timedc clockdiff cel
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 16 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 16 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 16 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci
time on cel.ccny.cuny.edu is 15 ms. ahead of time on sci

Now, when you do the same for a 3b1 with version 1.4 of LOSE/TCP (it
sure ain't WIN :-), here's what comes out:

% repeat 10 timedc clockdiff notvax
time on notvax.ccny.cuny.edu is 4491 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 5006 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4538 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 5107 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4275 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4456 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4994 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4490 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4865 ms. ahead of time on sci
time on notvax.ccny.cuny.edu is 4976 ms. ahead of time on sci

Now, the time difference is OK, the daemon isn't up and running yet.
But!  Look at the variability!  Our Celerity (and Vaxen) differ by at
most 1 millisecond.  The *range* for the 3b1 is 832 millisecs.  And
that's when the machine is IDLE!  What gives here?  Is the whole
ethernet driver just a kludge?!?  One day, when I get done writing my
thesis, I'll get around to rewriting it.

j
-- 
Jeffrey L. Bromberger
System Operator---City College of New York---Science Computing Facility
jeffrey at sci.ccny.cuny.edu			jeffrey at ccnysci.BITNET
	Anywhere!{cmcl2,philabs,phri}!ccnysci!jeffrey



More information about the Comp.sys.3b1 mailing list