📜  c++ time nanoseconds - C++ 代码示例

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

代码示例1
#include 
#include 

int main() {
    auto start = std::chrono::high_resolution_clock::now();
    // operation to be timed ...
    auto finish = std::chrono::high_resolution_clock::now();
    auto time_in_nanoseconds =  std::chrono::duration_cast(finish-start).count();
}