I am developing an algorithm which uses highly the math library and I’d like to measure the time it takes to execute. As a first aproximation I decided to send something through the serial interface, then execute the algorithm several times and after those executions print another thing onto the serial port. But it comes that the dump through the serial port is done when the algorithm finishes their executions so I can’t measure it properly. According to this behaviour i’m not sure if using a GPIO bringing it up and down each time the algorithm starts and finishes its execution and measuring it with an oscilloscope will be a nice a idea. Anyway, any of you have an idea to measure such a thing?