mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
LevelManager: add debug message when a level takes too long to tick
This commit is contained in:
@ -346,6 +346,9 @@ class LevelManager{
|
|||||||
$level->doTick($currentTick);
|
$level->doTick($currentTick);
|
||||||
$tickMs = (microtime(true) - $levelTime) * 1000;
|
$tickMs = (microtime(true) - $levelTime) * 1000;
|
||||||
$level->tickRateTime = $tickMs;
|
$level->tickRateTime = $tickMs;
|
||||||
|
if($tickMs >= 50){
|
||||||
|
$this->server->getLogger()->debug(sprintf("World \"%s\" took too long to tick: %gms (%g ticks)", $level->getDisplayName(), $tickMs, round($tickMs / 50, 2)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->autoSave and ++$this->autoSaveTicker >= $this->autoSaveTicks){
|
if($this->autoSave and ++$this->autoSaveTicker >= $this->autoSaveTicks){
|
||||||
|
Reference in New Issue
Block a user