C++ 测量程序执行时间的办法

#include  <time.h> 

clock_t start = clock();  //时间起始 
/*待测试代码*/         
clock_t end   = clock(); //时间测试结束

cout<<end - start<<endl; //计算打印出运行时间,单位ms
原文地址:https://www.cnblogs.com/xingboy/p/11262627.html