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;
    }
}

Windows VC++

 

原创文章,作者:1402239773,如若转载,请注明出处:https://blog.ytso.com/tech/aiops/277223.html

(0)
上一篇 2022年7月27日 00:19
下一篇 2022年7月27日 00:19

相关推荐

发表回复

登录后才能评论