mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-29 08:05:50 +03:00
HLDS Lanucher: make sure the timer is high precision (Fixes #799)
This commit is contained in:
parent
2f2be916c2
commit
3fc9ee2f55
@ -60,10 +60,16 @@ CSys::CSys()
|
|||||||
WORD version = MAKEWORD(2, 0);
|
WORD version = MAKEWORD(2, 0);
|
||||||
WSADATA wsaData;
|
WSADATA wsaData;
|
||||||
WSAStartup(version, &wsaData);
|
WSAStartup(version, &wsaData);
|
||||||
|
|
||||||
|
// Request 1ms resolution for windows timer
|
||||||
|
timeBeginPeriod(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSys::~CSys()
|
CSys::~CSys()
|
||||||
{
|
{
|
||||||
|
// Clear previously set timer resolution
|
||||||
|
timeEndPeriod(1);
|
||||||
|
|
||||||
WSACleanup();
|
WSACleanup();
|
||||||
sys = nullptr;
|
sys = nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user