📜  c++ 以微秒为单位测量时间 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:45.507000             🧑  作者: Mango

代码示例1
auto start = std::chrono::high_resolution_clock::now();
...
auto elapsed = std::chrono::high_resolution_clock::now() - start;

long long microseconds = std::chrono::duration_cast(elapsed).count();