This is the mail archive of the
ecos-discuss@sourceware.cygnus.com
mailing list for the eCos project.
RE: Microseconds
- To: Jurica Baricevic <jura at INTESIS dot hr>
- Subject: RE: [ECOS] Microseconds
- From: Gary Thomas <gthomas at redhat dot com>
- Date: Tue, 13 Jun 2000 10:15:58 -0600 (MDT)
- Cc: Ecos <ecos-discuss at sourceware dot cygnus dot com>
On 13-Jun-00 Jurica Baricevic wrote:
> Hi.
>
> I need a function similar to QueryPerformanceCounter() on Windows CE. That
> is, I would like to have a 'clock' with resolution of 1 microsecond.
> Unfortunately, I didn't find anything in eCos documentation that could lead
> me to appropriate kernel function. Did I miss something?
> Naturally, if there is no such a function I will have to implement it by
> myself. I guess that I will need to use both cyg_current_time() and
> HAL_CLOCK_READ(). Namely, I want to get both times, convert them to
> microseconds and add them together. Is this a correct way? Any hints?
>
This is the correct approach. Look at the kernel test 'tm_basic' for some
examples of how you use these values and convert them to "people" terms.