From: Grant Edwards <grante@visi.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] RedBoot: patch to improve net timekeeping.
Date: Mon, 22 Jan 2001 15:11:00 -0000 [thread overview]
Message-ID: <20010122171603.B27137@visi.com> (raw)
Here's a patch to net_io.c that changes the getc() routines
to call MS_TICKS() rather than CYGACC_CALL_IF_DELAY_US() when
waiting for input.
If a similar approach is used in the HAL's serial i/o routines,
it results in the system time being fairly accurate if the CPU
isn't heavily loaded. As long as you call MS_TICKS() when
you're in a busy-idle loop, the accuracy of the system time is
determined by the CPU usage: 10% CPU means the clock is 10%
slow. This should make it fairly useful for non-critical
interval timing.
NB: This changes the incremental wait in the net_io getc
routines from 100us to 1ms. If somebody really needs 100us
wiats, a second delay routine could be added to ticks.c
that delays for 100us and increments the "ticks" variable
every 10th call.
--
Grant Edwards
grante@visi.com
reply other threads:[~2001-01-22 15:11 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:
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=20010122171603.B27137@visi.com \
--to=grante@visi.com \
--cc=ecos-discuss@sources.redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).