#pragma comment(lib, "rpcrt4.lib") #include <iostream> #include <chrono> #include <fstream> #include <iostream> #include <limits.h> #include <sstream> #include <string> #include <Windows.h> using namespace std; void testTime(); int main() { testTime(); cin.get(); } void testTime() { for (int j = 0;j < 10;j++) { auto startTime = chrono::system_clock::now(); for (int i = 0; i < 100000000; i++) { UUID uuid; UuidCreate(&uuid); } auto endTime = chrono::system_clock::now(); cout << j << ","<< chrono::duration_cast<chrono::milliseconds>(endTime - startTime).count() << " milliseconds" << endl; } }
原创文章,作者:1402239773,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/277223.html