I'm using the following code to measure the runtime of my code
Code: Select all
start = chTimeNow();
my code
end = chTimeNow();
chprintf((BaseSequentialStream *) &SD1, "%fus\r\n", RTT2US(end - start));
I'm reciving 19 or 20 us, I never expected that my code is so fast. Am I measuring the running time in the right way?
Thanks,
Robert