#include <iostream>
using namespace std;
int main()
{
auto begin = chrono::high_resolution_clock::now();
//xxx
auto end = chrono::high_resolution_clock::now();
cout << "time: " << chrono::duration_cast<chrono::microseconds>(end - begin).count() * 1e-6 << "s" << endl; //秒计时
}
C++中计时函数使用
最新推荐文章于 2022-11-22 11:21:29 发布