c++ 高精度计算程序运行时间

    科技2024-05-25  69

    #include <iostream> #include <chrono> int main(){ std::cout<<"input the number "<<std::endl; auto start = std::chrono::high_resolution_clock::now(); // 处理的程序代码 // // auto finish = std::chrono::high_resolution_clock::now(); std::chrono::duration<double> elapsed = finish - start; std::cout << "Elapsed time: " << elapsed.count() << " s\n"<<std::endl; return 0; }
    Processed: 0.014, SQL: 8