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.

Calculating the time required for processing

Hi experts,

                  I want to calculate the time required to execute process( ) of my code. Currently I have calculated in the manner given below

unsigned long long start_clock, stop_clock, clock_diff;

start_clock = _itoll(TSCH,TSCL);

process( );

stop_clock = _itoll(TSCH,TSCL);

clock_diff = stop_clock - start_clock;

time = clock_diff / operating frequency;

Is there any other method for doing the same? How about using CLK_gethtime( )?

Please give me feedback.  Its very urgent.

Regards

Pratheek