This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Measuring times
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Abhi <abhi at 4961ocean dot org>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 24 Nov 2004 18:04:10 -0700
- Subject: Re: [ECOS] Measuring times
- Organization: MLB Associates
- References: <1FC84DF36F705D2577A5F527@ASACHDEV2.na.qualcomm.com>
On Wed, 2004-11-24 at 13:59, Abhi wrote:
> Hi,
> eCos version: 2.0 + from the CVS
> Host: Linux Redhat 9 2.4.x kernel
> Target: iPAQ
> Redboot: yes (installed & working)
> Sample tests: some simple tests work
>
> Question:
> I would like to performance benchmark some of the code that I have
> written. Are there any helper functions in the sources/tests/examples which
> do this. (like a Stats kind of class, which maintains all the values in an
> array and then prints out mean/max/min etc...)
>
> More fundamentally, what functions should I use to measure the elapsed
> time between 2 points. Should I use:
>
> cyg_handle_t cyg_real_time_clock(void);
> or
> cyg_tick_count_t cyg_current_time(void)
> or
> something else which has better resolution on iPAQ?
>
> Also how do I convert these to seconds/micro-seconds on iPAQ? (i.e get the
> wall clock)
Look at the kernel test program 'tm_basic.cxx' It does exactly this.
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss