#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; }
原文地址:http://my.oschina.net/u/203607/blog/287869