2
0
mirror of https://github.com/rehlds/rehlds.git synced 2024-12-27 23:25:45 +03:00

HLDS Lanucher: make sure the timer is high precision (Fixes #799)

This commit is contained in:
s1lentq 2021-03-13 20:36:10 +07:00
parent 2f2be916c2
commit 3fc9ee2f55

View File

@ -60,10 +60,16 @@ CSys::CSys()
WORD version = MAKEWORD(2, 0);
WSADATA wsaData;
WSAStartup(version, &wsaData);
// Request 1ms resolution for windows timer
timeBeginPeriod(1);
}
CSys::~CSys()
{
// Clear previously set timer resolution
timeEndPeriod(1);
WSACleanup();
sys = nullptr;
}