I need to measure the number of cycles or execution time spent on a function. I tried to use the normal clock() function after including the <time.h> library and got errors and i'm starting to think that using the clock() function won't lead to any results.
I am a beginner and i would appreciate any help or hint possible.
I'm using the S32 Design Studio for ARM along with the S32K144 EVB.
Another method would be to toggle a pin at the start and end of the function. You can measure this with an oscilloscope. To get exact numbers, you will need to subtract the time for the pin toggling commands, but this is perhaps the easiest method.