Wednesday, August 4, 2010

Finding time of execution of code in c

#include <time.h>

clock_t start;
clock_t diff;
clock_t end;

start= clock();
various algorithm;
end = clock();

diff = end - start;
print diff;

Reactions:

0 comments:

Post a Comment