From d786ed5ebfa17c2704f5d2b322eb9f350ec7b189 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 13 Jan 2023 17:43:02 +0000 Subject: [PATCH 1/2] WorldManager: fixed debug spam --- src/world/WorldManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/WorldManager.php b/src/world/WorldManager.php index 9ee68cc0e6..b09fe2ace1 100644 --- a/src/world/WorldManager.php +++ b/src/world/WorldManager.php @@ -350,7 +350,7 @@ class WorldManager{ $world->doTick($currentTick); $tickMs = (microtime(true) - $worldTime) * 1000; $world->tickRateTime = $tickMs; - if($tickMs >= Server::TARGET_SECONDS_PER_TICK){ + if($tickMs >= Server::TARGET_SECONDS_PER_TICK * 1000){ $world->getLogger()->debug(sprintf("Tick took too long: %gms (%g ticks)", $tickMs, round($tickMs / Server::TARGET_SECONDS_PER_TICK, 2))); } } From 2ed48c84692f77d491c9070a5b988d6ad8ba36b5 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 13 Jan 2023 17:46:16 +0000 Subject: [PATCH 2/2] ... --- src/world/WorldManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/WorldManager.php b/src/world/WorldManager.php index b09fe2ace1..5632c960bd 100644 --- a/src/world/WorldManager.php +++ b/src/world/WorldManager.php @@ -351,7 +351,7 @@ class WorldManager{ $tickMs = (microtime(true) - $worldTime) * 1000; $world->tickRateTime = $tickMs; if($tickMs >= Server::TARGET_SECONDS_PER_TICK * 1000){ - $world->getLogger()->debug(sprintf("Tick took too long: %gms (%g ticks)", $tickMs, round($tickMs / Server::TARGET_SECONDS_PER_TICK, 2))); + $world->getLogger()->debug(sprintf("Tick took too long: %gms (%g ticks)", $tickMs, round($tickMs / (Server::TARGET_SECONDS_PER_TICK * 1000), 2))); } }