(旧)研究メモ

kennkyuumemo

プログラムの 計算時間を知りたい時

#include <time.h>

int main(){

clock_t time_start = 0;
clock_t time_end = 0;
time_start = clock();

//時間を測りたい処理

time_end = clock();
cout << "Computing time is " << double(time_end-time_start)/CLOCKS_PER_SEC << " [s]" << endl;

}