This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM243: Count Clock Cycles / Internal Clock Measurement?

Part Number: LP-AM243

Is there an example or method for counting how long functions take to execute? I need to measure how long some operations take to complete in order to make sure things are handled in a timely manor.

In C++ this is accomplished with the code below, but of course this is C based so I don't think it has that program.

#include <chrono>

...

start = high_resolution_clock::now();
(some functions)
stop = high_resolution_clock::now();
duration = duration_cast<microseconds>(stop - start);

...