* Re: timer idioms in embedded system (fwd)
@ 1998-06-26 7:30 Frank W. Miller
0 siblings, 0 replies; only message in thread
From: Frank W. Miller @ 1998-06-26 7:30 UTC (permalink / raw)
To: c++-embedded; +Cc: Frank W. Miller
From fwmiller Fri Jun 26 10:29 EDT 1998
From: fwmiller (Frank W. Miller)
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: < firstname.lastname@example.org > from "Ken" at Jun 25, 98 08:41:06 pm
X-Mailer: ELM [version 2.4 PL25]
Content-Type: text/plain; charset=US-ASCII
> 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
email@example.com University of Maryland
http://www.cs.umd.edu/~fwmiller College Park, Maryland 20742
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-06-26 7:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-06-26 7:30 timer idioms in embedded system (fwd) Frank W. Miller
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).