Код: Выделить всё
clock_t t;
t = clock();
//algorithm
t = clock() - t;
< /code>
tКак сравнить время процессора двух алгоритмов?>
Подробнее здесь: https://stackoverflow.com/questions/201 ... e-cpu-time
Код: Выделить всё
clock_t t;
t = clock();
//algorithm
t = clock() - t;
< /code>
t