mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
LevelManager: add debug message when a level takes too long to tick
This commit is contained in:
parent
6bd43a8215
commit
c3e66e0adc
@ -346,6 +346,9 @@ class LevelManager{
|
||||
$level->doTick($currentTick);
|
||||
$tickMs = (microtime(true) - $levelTime) * 1000;
|
||||
$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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user