[ECOS] Length of a system tick
Gernot Zankl
zankl@decomsys.com
Fri Nov 24 08:06:00 GMT 2006
Hi Gary !
> > Does an easy way (API function,#define...) exists to find
> out how long
> > one system tick lasts (e.g. in nanoseconds) ?
> > I need this value in an application, which does/should not know the
> > exact ratio.
>
> Unless you change something, it will be 10ms.
I just do not want to code a constant inside the application, which is
is not determined by the appication itself, but rather by the used
kernel.
> You can also look at the CDL parameters to compute this.
> From 'tm_basic.cxx':
>
> static long rtc_resolution[] = CYGNUM_KERNEL_COUNTERS_RTC_RESOLUTION;
> long ns_per_system_clock = 1000000/rtc_resolution[1];
Thanks for your hint.
Works perfectly !
Regards,
Gernot Zankl
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list