Windows VC++
作者:互联网
#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; } }
标签:uuid,lib,clock,Windows,C++,testTime,int,include 来源: https://www.cnblogs.com/Fred1987/p/16523014.html