windows下的计算时间间隔 -- GetTickCount()
用法:
#include "windows.h"
DWORD lastTime =0;
DWORD currentTime = 0;
DWORD spendTime = 0;
lastTime = GetTickCount();//ms
//延时
currentTime = GetTickCount();
spendTime = currentTime - lastTime;//ms
用法:
#include "windows.h"
DWORD lastTime =0;
DWORD currentTime = 0;
DWORD spendTime = 0;
lastTime = GetTickCount();//ms
//延时
currentTime = GetTickCount();
spendTime = currentTime - lastTime;//ms