I am interested in recording the number of clock ticks between two points in my code. I have implemented the following example in my code.
#include <time.h> clock_t start, end; double cpu_time_used; start = clock(); ... /* Do the work. */ end = clock(); cpu_time_used = ((double) (end - start)) / CLOCKS_PER_SEC;
However, clock() always retruns the same value: 16318713 0x00000612@Data
It also give the following error: cannot load from non-primitive location.
Can anyone explain what is going on here and how I can fix it?
Thank you very much.