标签:
#include<cstdio> #include<cstdlib> #include<ctime> using namespace std; int main() { int i=100000000; clock_t start,finish; double duration; start=clock();//开始计时刻 while(i--); finish=clock();//终止计时时刻 duration=(double)(finish-start)/(clock_t)(1000);//除以1000以秒为单位,否则单位是毫秒 printf("%llf\n",duration); return 0; }
标签:
原文地址:http://www.cnblogs.com/program-ccc/p/4927284.html