程序计时

#include <windows.h>
#include <iostream>
#include <vector>
using namespace std;
int main()
{

    DWORD startTime = GetTickCount64();//计时开始
    Sleep(2345);

    DWORD endTime = GetTickCount64();//计时结束
    cout << "The run time is:" << endTime - startTime << "ms" << endl;




    system("pause");
    return 0;
}

 

posted @ 2021-06-17 15:24  老婆饼里有老婆  阅读(97)  评论(0编辑  收藏  举报