summaryrefslogtreecommitdiffstats
path: root/src/World.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-12-07 15:46:27 +0100
committerMattes D <github@xoft.cz>2014-12-07 15:46:27 +0100
commit3c3cb198f33fd55b9cb20188cc42034b21660d21 (patch)
tree282d86969d4a2cbad5a64a27d1e17a5bad8dbed6 /src/World.cpp
parentMerge pull request #1555 from mc-server/c++11 (diff)
downloadcuberite-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/World.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/World.cpp b/src/World.cpp
index 14010b8b1..91e1199ee 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -239,7 +239,9 @@ void cWorld::cTickThread::Execute(void)
while (!m_ShouldTerminate)
{
auto NowTime = std::chrono::steady_clock::now();
- m_World.Tick(static_cast<float>(std::chrono::duration_cast<std::chrono::milliseconds>(NowTime - LastTime).count()), std::chrono::duration_cast<std::chrono::duration<int>>(TickTime).count());
+ auto msec = std::chrono::duration_cast<std::chrono::milliseconds>(NowTime - LastTime).count();
+ auto LastTickMsec = std::chrono::duration_cast<std::chrono::duration<int>>(TickTime).count();
+ m_World.Tick(static_cast<float>(msec), LastTickMsec);
TickTime = std::chrono::steady_clock::now() - NowTime;
if (TickTime < msPerTick)