This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Length of a system tick
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Gernot Zankl <zankl at decomsys dot com>
- Cc: ecos-discuss at sourceware dot org
- Date: Thu, 23 Nov 2006 09:56:33 -0700
- Subject: Re: [ECOS] Length of a system tick
- References: <0F0005CE495E094A96B04D78F24E5A7F4F32CA@mana.decomsys.com>
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