linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jerry Van Baren <vanbaren_gerald@si.com>
To: linuxppc-embedded@lists.linuxppc.org
Subject: Re: Using realtime clock?
Date: Wed, 10 Jan 2001 11:51:27 -0500	[thread overview]
Message-ID: <4.3.2.20010110114302.00ba2830@falcon.si.com> (raw)
In-Reply-To: <200101101622.f0AGMw208453@denx.local.net>


At 05:22 PM 1/10/01 +0100, Wolfgang Denk wrote:
>In message <4.3.2.20010110104647.00baee80@falcon.si.com> you wrote:
> >
> > The astronomy people, among others, are really fanatical about accurate
> > time and have some very elaborate programs to synchronize clocks to the
> > nanosecond (microsecond?) level.  These involve NTP daemons.  Note that
> > the NTP daemons can synchronize to a radio clock that provides a
> > 1/second tick: your simplest solution would probably be to set up your
> > accurate RTC to do a 1/second interrupt and then tie it into a NTP
> > daemon to keep your kernel clock accurate.
>
>Seems a bit of overhead (especially for embedded systems with limited
>resources) to add a NTP daemon just to make one part  of  the  kernel
>timekeeping toal to the other...
>
>Wolfgang Denk
>
>--
>Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
>Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd@denx.de
>"It's when they say 2 + 2 = 5 that I begin to argue."    - Eric Pepke

Yup.  However, adjtimex() is a function call that tweaks the clock
parameters in the kernel.  If you understood those parameters (I
don't), you could keep your clock very accurate.

If you tracked down some references (NTP source code, NTP RFCs, "David
L. Mills' clock adjustment algorithm"), I suspect you would be able to
figure out how to properly use adjtimex().  Further, I suspect
adjtimex() a pretty lightweight routine since it merely adjusts the
parameters that presumably already exist in your kernel.

I'm just leaving the fun parts for the reader :-).

gvb


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-01-10 16:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-10  4:16 Using realtime clock? Jari Nguyen Trung Thanh
2001-01-10  9:30 ` Gabriel Paubert
2001-01-10 12:33   ` Jerry Van Baren
2001-01-10 13:22     ` Jari Nguyen Trung Thanh
2001-01-10 15:06     ` Wolfgang Denk
2001-01-10 15:56       ` Jerry Van Baren
2001-01-10 16:22         ` Wolfgang Denk
2001-01-10 16:51           ` Jerry Van Baren [this message]
2001-01-10 16:59             ` Bill Roman
2001-01-10 19:16             ` Gabriel Paubert
2001-01-10 19:05         ` Gabriel Paubert

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=4.3.2.20010110114302.00ba2830@falcon.si.com \
    --to=vanbaren_gerald@si.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /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).