Hi there...

Would like to check with experts of Visual C++ out there..how am I able to get the time taken to run a centain portion of my program.

my current method is

StartClock = clock();

for (i = 0; i<n; i++)
{
x = x + 1; // just an example
}

EndClock = clock();

durationClock = EndClock - StartClock ;

however, it seems that the StartClock and EndClock are the same... probably the function is too fast.

Is there another way to capture the timing?

Thanks.

Joseph