I'm trying to optimize a loop, and in order to determine the effects of my
changes, I am logging some timings based on clock_gettime(CLOCK_THREAD_CPUTIME_ID).
But this appears to be pretty unreliable, the timings vary a lot even though the
loop always does the exact same thing.
What I want is to measure the CPU time or count the CPU ticks consumed by a
given thread. What is the recommended way to do so?
Thanks in advance
--
Olivier
By the way, does CLOCK_THREAD_CPUTIME_ID behave differently according to the SDK
version?
Thanks
Olivier
Cheers,
Olivier