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.

Clock not loading into variable.

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.