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


Gernot Zankl wrote:
Hi !

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.


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];

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
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]