1234567891011
#include <time.h> // ... double start = clock(); //some code .... double end = clock(); double total = (end - start) / CLOCKS_PER_SEC;