#include <time.h>
time_t start=clock();
time_t end=clock();
cout<<"time:"<<(double)(end-start)/CLOCKS_PER_SEC<<"s"<<endl;
版权声明:本文为weixin_44543418原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。
#include <time.h>
time_t start=clock();
time_t end=clock();
cout<<"time:"<<(double)(end-start)/CLOCKS_PER_SEC<<"s"<<endl;