This is the mail archive of the ecos-discuss@sourceware.org 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: Length of a system tick


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


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