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: Cannot find precise timer API...


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


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