记录某段程序的运行时间

1 float start =clock();
2 //TODO:再次插入需要测试的程序段
3 
4 float end=clock();
5 float time = (end-start)/CLOCKS_PER_SEC;
6 cout<<time;

 

posted @ 2017-08-08 15:30  Henry2017  阅读(276)  评论(0编辑  收藏  举报