1
0

Migrated cSleep and cTimer to std::chrono

This commit is contained in:
Tiger Wang
2014-10-20 18:59:40 +01:00
parent aa19a3afb0
commit bde99d684e
18 changed files with 45 additions and 168 deletions

View File

@@ -160,7 +160,10 @@ BOOL CtrlHandler(DWORD fdwCtrlType)
if (fdwCtrlType == CTRL_CLOSE_EVENT) // Console window closed via 'x' button, Windows will try to close immediately, therefore...
{
while (!g_ServerTerminated) { cSleep::MilliSleep(100); } // Delay as much as possible to try to get the server to shut down cleanly
while (!g_ServerTerminated)
{
std::this_thread::sleep_for(std::chrono::milliseconds(50)); // Delay as much as possible to try to get the server to shut down cleanly
}
}
return TRUE;