This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Cannot find precise timer API...
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Alexander Aganichev <aaganichev at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Fri, 29 Jun 2007 05:36:44 -0600
- Subject: Re: [ECOS] Cannot find precise timer API...
- References: <c25335bc0706290025i7bb092a9mbb12b9ec7e25d6a@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Aganichev wrote:
> Hi,
>
> I need to count intercharacter timeout in my app around 1.7 ms, but
> all API calls I found counts in ticks which are normally 10 ms. Is
> there a simple way to get more better precision? API call that returns
> absolute time in 0.1 ms (or better) will work just fine for me. Thanks
> in advance.
>
Measuring time can be done very precisely using HAL_CLOCK_READ().
See the examples in tm_basic.cxx - it measures time (deltas) down
to nanosecond resolution, depending on the precision of the clock
being used to drive the system timer.
- --
- ------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
- ------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGhO7MmaKbSsQGV8ARAuDgAJ9gYRyPqWRoKeFBZTWMPJdnhiehCQCff9Z6
jHhiAQJg9u2fOLOa5RKpJA8=
=cDue
-----END PGP SIGNATURE-----
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss