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: measure the execution time of each thread


On 04/23/2011 09:07 AM, moktar_bouain wrote:

As I said before, look at how it's done in tm_basic.cxx

I did, but I do not understand how to modify. Can you give me some details?

You don't want to modify that code, just look at how it computes time at a nanosecond scale.

Look at the function show_time_in_us() which uses time values
based on the function HAL_CLOCK_READ() that reads the system timer
(whatever that may be) and calculates time to the most accurate
value available in the system.  This is based on the raw clock
(often the hardware system clock) that's used to run the system
'tick' timer.  On most systems, this value is accurate to micro-seconds,
sometimes even nano-seconds.

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