This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Getting the trigger value of an Alarm -> is it possible?
- To: Elias Biris <ebiris at cadence dot com>
- Subject: Re: [ECOS] Getting the trigger value of an Alarm -> is it possible?
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Thu, 31 May 2001 22:46:36 +0100
- Cc: ecos-discuss at sourceware dot cygnus dot com
- Organization: Red Hat UK Ltd.
- References: <5.1.0.14.0.20010531180756.00a8bb40@lvmailhost.cadence.com>
Elias Biris wrote:
>
> hello,
>
> I am new to the usage of eCos and admittedly I am still trying to learn the
> ropes with RTOSes and embedded sw.
>
> I got a question related to alarms and counters as they get handled in
> eCos. I'd like to have the ability to get the a count of how many ticks are
> remaining at any point in time till the expiration of a timer. Since the
> internals of Cyg_Alarm class are protected, and there is no api to get to
> them I thought someone may have an idea or similar experience. I could do
> something like the following :
>
> From the outset I am keeping the period of a timer. By getting the time of
> the last expiration I could get to find the number of ticks till the next
> expiration.
>
> However, this is not very accurate. Any ideas ?
This may be one of the times when you find it's really useful to have the
source and customize whatever you want...
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
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions http://www.redhat-techworld.com/