#include <time.h>
clock_t start, end;
double duration;
start = clock();
//do something
end = clock();
duration = (double)(end-start)/CLOCKS_PER_SEC; //秒
clock_t start, end;
double duration;
start = clock();
//do something
end = clock();
duration = (double)(end-start)/CLOCKS_PER_SEC; //秒