AnsweredAssumed Answered

How can I measure the execution time of a function?

Question asked by Julian Hoerz on Jun 29, 2016
Latest reply on Jul 1, 2016 by Martin Lorenz

The command "clock()" doesn't work correct for me, also the command "time()".

It always returns the 2^32-1.

My code looks like this:

clock_t begin = clock();


clock_t end = clock();

Normally the values of the variables should be different but in both variables (begin and end) are the same numbers... Always 4294967295 (2^32-1).

I am using a LPC4357 with LPCXpresso 8.1.4.


The clock-function comes from time.h from redlib....


I cannot use the RTC example from LPC Open, because it can only count seconds....