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


>Looks like HAL_CLOCK_READ() isn't working on your hardware.
>What's your target hardware?  Is it part of the public eCos tree?
Hi Gary,
I used the  processor leon3 (SPARC) with the platform Digilent-XUP.
I tried with HAL_CLOCK_READ(), and i added the following lines:
HAL_CLOCK_READ(&t1);
HAL_CLOCK_READ(&t2);
printf("t1 is: %lu \n",t1);
printf("t2 is: %lu \n",t2);
printf("t2-t1 is: %d\n",t2-t1);

The result is:
t1 is:333
t2 is:294
t2-t1 is:-39


-- 
View this message in context: http://old.nabble.com/measure-the-execution-time-of-each-thread-tp31407684p31493032.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


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