C++程序运行时间统计:
头文件包含:#include <chrono>
using namespace std::chrono
内容:
system_clock::time_point now = system_clock::now();
your code here:
system_clock::time_point end = system_clock::now();
double dt = duration_cast<duration<double>>(end - now).count();
printf("-----dt time:%f----\n", dt);