diff options
author | Mattes D <github@xoft.cz> | 2014-12-07 15:46:27 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-12-07 15:46:27 +0100 |
commit | 3c3cb198f33fd55b9cb20188cc42034b21660d21 (patch) | |
tree | 282d86969d4a2cbad5a64a27d1e17a5bad8dbed6 /src/Server.cpp | |
parent | Merge pull request #1555 from mc-server/c++11 (diff) | |
download | cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar.gz cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar.bz2 cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar.lz cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar.xz cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.tar.zst cuberite-3c3cb198f33fd55b9cb20188cc42034b21660d21.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Server.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Server.cpp b/src/Server.cpp index db1522602..d6163df7e 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -78,7 +78,8 @@ void cServer::cTickThread::Execute(void) while (!m_ShouldTerminate) { auto NowTime = std::chrono::steady_clock::now(); - m_ShouldTerminate = !m_Server.Tick(static_cast<float>(std::chrono::duration_cast<std::chrono::milliseconds>(NowTime - LastTime).count())); + auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(NowTime - LastTime).count(); + m_ShouldTerminate = !m_Server.Tick(static_cast<float>(msec)); auto TickTime = std::chrono::steady_clock::now() - NowTime; if (TickTime < msPerTick) |