Migrated cSleep and cTimer to std::chrono
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user