public inbox for
 help / color / mirror / Atom feed
From: (Frank W. Miller)
Cc: (Frank W. Miller)
Subject: Re: timer idioms in embedded system (fwd)
Date: Fri, 26 Jun 1998 07:30:00 -0000	[thread overview]
Message-ID: <> (raw)

Forwarded message:
From fwmiller Fri Jun 26 10:29 EDT 1998
From: fwmiller (Frank W. Miller)
Message-Id: <>
Subject: Re: timer idioms in embedded system
Date: Fri, 26 Jun 1998 10:29:36 -0400 (EDT)
Cc: fwmiller (Frank W. Miller)
In-Reply-To: < > from "Ken" at Jun 25, 98 08:41:06 pm
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Content-Length: 929

> I'd like to change this to use a single counter incremented by the
> interrupt. Client code would wait for the counter to increment to a
> desired value. Example wait code might be

You might want to look at the timer management for TCP in XINU.
They keep a list of timeouts.  All but the first are deltas so
the first element is the only one decremented on an interrupt.
Check Comer's ``Internetworking with TCP/IP: Vol 2''.

> How should I handle rollover? I expect the counter to be 32-bit, and the
> interrupt tick to be 1 millisecond. The rollover should occur about
> every 46 days.

I use a daemon that pops up every so often, once a day or once a week,
and resets the counter.


Frank W. Miller                           Department of Computer Science                               University of Maryland             College Park, Maryland 20742

                 reply	other threads:[~1998-06-26  7:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:

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

  git send-email \ \ \ \

* 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 read-only IMAP folder(s) and NNTP newsgroup(s).