This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Changing system timer resolution
- From: "Jurica Baricevic" <jura at INTESIS dot hr>
- To: "Grant Edwards" <grante at visi dot com>, "Gary Thomas" <gthomas at redhat dot com>
- Cc: "eCos Discussion" <ecos-discuss at sources dot redhat dot com>
- Date: Thu, 29 Nov 2001 09:54:52 +0100
- Subject: RE: [ECOS] Changing system timer resolution
Grant Edwards wrote (Wednesday, November 28, 2001 18:40):
> > > Digression:
> > > Also, it would be nice to have some high-resolution
> > > performance counter for
> > > more precise time handling. For example, microsecond handling is quite
> > > common in today's RTOS applications. The high-resolution
> > > counter shouldn't
> > > be limited by system timer tick resolution, but with the
> > > underlying hardware
> > > clock resolution.
> >
> > This is already available using the HAL_CLOCK_READ() functionality.
> > Look for examples of how to use it in the 'tm_basic.cxx' test program.
>
> I think that only solves one side of the problem. The other
> side is when you want an event to happn 7354us from now.
>
Yes, that was what I meant. Some more general solution is preferred.
I do not know are there any POSIX standard function for handling
high-resolution counter ( gettimeofday()? ), but I hope that somebody
acquainted with the standard could advise. However, Win32 API equivalent is
probably 'QueryPerformanceCounter()'.
Best regards,
Jura