STM32F4 Discovery function execution time
Posted: Fri Dec 13, 2013 3:25 pm
Hello,
I need to measure the execution time of a function ( function1() ) in milliseconds and print it. I wrote this code but it just gives me the system ticks. I need milliseconds.
systime_t start,stop, final;
start = chTimeNow();
function ();
stop = chTimeNow();
final = stop - start;
chprintf(chp, Time : %ld.%06ld\r\n",final);
Thank you for your help.
Jessi
I need to measure the execution time of a function ( function1() ) in milliseconds and print it. I wrote this code but it just gives me the system ticks. I need milliseconds.
systime_t start,stop, final;
start = chTimeNow();
function ();
stop = chTimeNow();
final = stop - start;
chprintf(chp, Time : %ld.%06ld\r\n",final);
Thank you for your help.
Jessi