auto start = std::chrono::steady_clock::now(); // 记录经过此时的时间
// ... 运行一段代码
auto use_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - start);
double timestamp = (double)us_time.count() / 1000.0;
2023-12-23 14:14:58
auto start = std::chrono::steady_clock::now(); // 记录经过此时的时间
// ... 运行一段代码
auto use_time = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now() - start);
double timestamp = (double)us_time.count() / 1000.0;