This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: RedBoot network timer question
- To: Grant Edwards <grante at visi dot com>
- Subject: RE: [ECOS] RedBoot network timer question
- From: Gary Thomas <gthomas at cambridge dot redhat dot com>
- Date: Thu, 18 Jan 2001 16:35:42 -0700 (MST)
- Cc: ecos-discuss at sources dot redhat dot com
- Organization: Red Hat, Inc.
On 18-Jan-2001 Grant Edwards wrote:
>
> Are the following observations correct?
>
> 1) The network code keeps track of millisecond "ticks" by
> delaying for 1ms and incrementing a counter every time any
> of the code uses the MS_TICKS() to check the current time.
>
> 2) But, the network polling code is only called once every
> 250ms [the timeout value passed to gets() by the main
> loop]. I verified this by pinging the board and response
> times varied from 4m to 290ms with a mean of 144ms.
>
> 3) That means that the network time only increments by a few
> milliseconds once every 250ms. Time would appear to pass
> very slowly to the network routines, making the TCP
> timeouts longer by a factor of about 100.
>
Depending on the platform, these observations vary in their correctness.
Some platforms have running timers which the delay routines simply
monitor. Others will actually simply wait.
Point of observation: timers in the RedBoot stack are meant to keep
things from hanging up, not meant to be necessarily "wallclock" accurate.
If you can tell me how to implement such [accurate] timers without using
interrupts [and with reasonable overheads], I'm all ears.