From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: YuHsueh Chou Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] Count and Clock? Date: Thu, 22 Mar 2001 17:26:00 -0000 Message-id: <3ABAA63A.F466A54@redhat.com> References: <3ABA39A0.2363612D@omegaband.com> <3ABA534F.59006EEB@redhat.com> <3ABA7448.57A2E986@omegaband.com> <000701c0b334$50dc9ac0$826509c0@samningw2k> X-SW-Source: 2001-03/msg00377.html 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