Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!rpi!sci.ccny.cuny.edu!jeffrey From: jeffrey@sci.ccny.cuny.edu (Jeffrey L Bromberger) Newsgroups: comp.sys.3b1 Subject: Re: RTC precision? Summary: Also ethernet flakeyness! Keywords: RTC system clock microseconds Message-ID: <1991Feb28.160950.7042@sci.ccny.cuny.edu> Date: 28 Feb 91 16:09:50 GMT References: <1991Feb27.195148.4122@sci.ccny.cuny.edu> <12768@helios.TAMU.EDU> Followup-To: comp.sys.3b1 Organization: City College of New York - Science Computing Facility Lines: 62 In article <12768@helios.TAMU.EDU> dlb5404@tamuts.tamu.edu (Daryl Biberdorf) writes: >In article <1991Feb27.195148.4122@sci.ccny.cuny.edu> jeffrey@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@sci.ccny.cuny.edu jeffrey@ccnysci.BITNET Anywhere!{cmcl2,philabs,phri}!ccnysci!jeffrey