C++ 测试程序运行时间

#include 


clock_t startTime,endTime;

startTime = clock();
auto vars = mpc.Solve(state, coeffs);
endTime = clock();
cout << "The run time is: " << (double)(endTime - startTime) / CLOCKS_PER_SEC  << "s" << endl;
    

你可能感兴趣的:(C++ 测试程序运行时间)