#include <ctime>
clock_t start, stop;
start = clock(); //開始時間
stop = clock(); //結束時間
cout << double(stop - start) / CLOCKS_PER_SEC <<endl;
這樣就會印出秒數了
全站熱搜
#include <ctime>
clock_t start, stop;
start = clock(); //開始時間
stop = clock(); //結束時間
cout << double(stop - start) / CLOCKS_PER_SEC <<endl;
這樣就會印出秒數了
留言列表