#include <iostream> #include <ctime> using namespace std; int main() { clock_t start,finish; //先行后列 start=clock(); //执行内容 //....... finish=clock(); //totaltime=(double)()/CLOCKS_PER_SEC; cout<<"先行后列遍历时间为:"<<finish-start<<"ms"<<endl; return 0; }
计算C++算法运行时间
时间: 2024-10-12 14:16:10