This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Count and Clock?
YuHsueh Chou wrote:
>
> Hello all,
>
> what is defferent between count and clock in eCos reference Manual?
> may you take an example for me. thanks a lot for your response..
Counters can be incremented as and when, whereas clocks are a special case
of counter that are regularly periodic. Clocks are counters with a
resolution. That resolution gives you the period between the regular clock
ticks.
A clock example is, of course, the kernel real time clock which is
periodic.
Alarms are associated with counters, not only clocks (which are just a
special form of counter). So you can use this to cause an alarm handler to
run after the counter reaches a certain value, e.g. every 10 events.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine