计算程序运行所花的时间

#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,n,start,end;
start=clock();
for (int i=1;i<=1111111111;i++)
n=1;
end=clock();
cout<<double(end-start)/CLOCKS_PER_SEC<<endl;

}

原文地址:https://www.cnblogs.com/cutemush/p/13584597.html