This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]