9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: presotto@plan9.bell-labs.com presotto@plan9.bell-labs.com
Subject: Keeping the fileserver's clock straight
Date: Thu, 17 Oct 1996 09:49:45 -0400	[thread overview]
Message-ID: <19961017134945.DdeK2FHeYnJ_8XgTaGMjvUZLBF0nmLvgkHDBGEQCh8Y@z> (raw)

fs used to call a clock server via datakit once every
few (I think 3) hours.  Datakit isn't exactly the most
ubiquitous network though.  What I've done lately with ours
is to just have it check the time of day clock.  Works
well on our current boxes since the tod clocks don't seem
to drift much.  Here's the changes, such as they are.  I'm
not doing a boddle since there are some other changes in
there that I don't know the origin of:

in wormcopy() of main.c

% diff main.c /n/juke/plan_9/sys/src/fs/port
305c305
< 	long nddate, ntoytime, t, dt;
---
> 	long nddate, t, dt;
316,317d315
< 	ntoytime = time() + HOUR(1);
< 
330,342d327
< 
< 	if(t > ntoytime) {
< 		dt = time() - rtctime();
< 		if(dt < 0)
< 			dt = -dt;
< 		if(dt > 10)
< 			print("rtc time more than 10 secounds out\n");
< 		else
< 		if(dt > 1)
< 			settime(rtctime());
< 		ntoytime = time() + HOUR(1);
< 		goto loop;
< 	}

in cmd_date() of con.c, set rtc in addition to normal time.

% diff con.c /n/juke/plan_9/sys/src/fs/port
416,417d415
< 	setrtc(ct);
< 




             reply	other threads:[~1996-10-17 13:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-17 13:49 presotto [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-10-17 15:05 Boyd
1996-10-17 14:55 Nigel
1996-10-17 14:49 Boyd
1996-10-17  9:18 Nigel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19961017134945.DdeK2FHeYnJ_8XgTaGMjvUZLBF0nmLvgkHDBGEQCh8Y@z \
    --to=presotto@plan9.bell-labs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).