#include "time.h"
clock_t start, finish;
double duration;
start = clock();
//Here puts your codes
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;
C++中如何记录代码运行时间
最新推荐文章于 2024-06-22 17:14:28 发布
#include "time.h"
clock_t start, finish;
double duration;
start = clock();
//Here puts your codes
finish = clock();
duration = (double)(finish - start) / CLOCKS_PER_SEC;