#include<time.h> //获取时间头文件//-------------------------------------- clock_t start_time=clock(); //开始时间 { //...... } clock_t end_time=clock(); //结束时间 //-------------------------------------- cout<< "Running time is: " <<static_cast<double>(end_time - start_time)/CLOCKS_PER_SEC <<"(s)"<<endl; //输出运行时间
时间: 2024-10-10 12:40:16