kidapu
10/4/2015 - 6:06 AM

C++ time measure

C++ time measure


clock_t clockStart, clockEnd;
clockStart = clock();

// ... 処理 ...

clockEnd = clock();
cout << "duration = " << (double)(clockEnd - clockStart) / CLOCKS_PER_SEC << "sec.\n";