测试代码运行时间

#include<stdio.h>
#include<time.h>

int main()
{
int n=1000000;
clock_t start,end;
start = clock();

//这里添加要测试的代码

end = clock();
printf("%lf\n",double(end-start));
return 0;
}

posted @ 2013-01-24 14:54  I want you  阅读(122)  评论(0)    收藏  举报