Re: measure the execution time of each thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


>http://ecos.sourceware.org/docs-latest/ref/kernel-clocks.html

>static cyg_tick_count_t run_time;
>cyg_tick_count_t start, end, run_time;

>while (1) {
  > start = cyg_current_time();

   ><processing ...>

   >end = cyg_current_time();
   >run_time = end - start;
>}

>Then you just need to convert ticks to time, based on the tick rate
>for your platform.

Hi Mike,
Thank you for your  reply.
I tried with your solution,but the value of run_time is always
constant.(run_time =1)



-- 
View this message in context: http://old.nabble.com/measure-the-execution-time-of-each-thread-tp31407684p31428080.html
Sent from the Sourceware - ecos-discuss mailing list archive at Nabble.com.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



[Linux Embedded]     [U-Boot V2]     [Linux Kernel]     [Linux MIPS]     [Linux ARM]     [Linux for the Blind]     [Linux Resources]     [Photo]     [Yosemite]     [ISDN Cause Codes]     [ECOS Home]     [Site Home]

Add to Google Powered by Linux