[ECOS] Timer tick length

Grant Edwards grante@visi.com
Tue Apr 4 11:22:00 GMT 2000


> > If I go with that configuration when I run the ping_test, I get
> > "recvfrom: Operation timed out" messages quite quickly -- it
> > takes less than 2 seconds for all 16 timeouts. Does the TCP/IP
> > stack assume that a clock tick is 10ms?  (On my system it's
> > 1ms.)
>
> Yup.  We [currently] don't have a good way to tell the length
> of a tick.

The problem of application code not knowing how long a "tick"
is seems to keep popping up.  In most other RTOS systems I've
used, there was a constant or a pair of macros defined in a
header that allowed application code to convert between ticks
and "real" time (seconds or milliseconds).  This allowed one to
write code that didn't break when the length of a clock tick
was changed.

I think the eCos really needs something like that.  I've had to
change the tick value back and fourth several times to
accomodate different application code.  It's currently at 10ms
to allow the TCP/IP stack to work, but I'll have to come up
with a way to get it back to 1ms so that other portions of my
application will work correctly and yet keep TCP/IP working.

Any thoughts on providing a way to let application code know
how long a tick is?

-- 
Grant Edwards
grante@visi.com


More information about the Ecos-discuss mailing list