diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 19:59:40 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-10-20 19:59:40 +0200 |
commit | bde99d684e0bb51adaa053a240abe61cf4af07fb (patch) | |
tree | ad1111d21ee606dd3cd60439189a92b1b51e2dea /src/main.cpp | |
parent | Migrated random generators to std::random (diff) | |
download | cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar.gz cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar.bz2 cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar.lz cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar.xz cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.tar.zst cuberite-bde99d684e0bb51adaa053a240abe61cf4af07fb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 86ecd4000..b1cfd6976 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; |