C++计时函数

1     auto start = std::chrono::steady_clock::now();
2 
3     API( );
4 
5     auto end = std::chrono::steady_clock::now();
6     std::chrono::duration<double> spent = end - start;
7     std::cout << " Time: " << spent.count() << " sec \n";
8  

 

posted @ 2019-12-26 15:40  Parallax  阅读(107)  评论(0编辑  收藏  举报