mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'next-minor'
This commit is contained in:
@ -32,6 +32,8 @@ use pocketmine\scheduler\TaskHandler;
|
||||
use function dechex;
|
||||
|
||||
abstract class Timings{
|
||||
/** @var bool */
|
||||
private static $initialized = false;
|
||||
|
||||
/** @var TimingsHandler */
|
||||
public static $fullTickTimer;
|
||||
@ -113,9 +115,10 @@ abstract class Timings{
|
||||
public static $pluginTaskTimingMap = [];
|
||||
|
||||
public static function init() : void{
|
||||
if(self::$serverTickTimer instanceof TimingsHandler){
|
||||
if(self::$initialized){
|
||||
return;
|
||||
}
|
||||
self::$initialized = true;
|
||||
|
||||
self::$fullTickTimer = new TimingsHandler("Full Server Tick");
|
||||
self::$serverTickTimer = new TimingsHandler("** Full Server Tick", self::$fullTickTimer);
|
||||
|
@ -168,7 +168,7 @@ class TimingsHandler{
|
||||
|
||||
public function stopTiming() : void{
|
||||
if(self::$enabled){
|
||||
if(--$this->timingDepth !== 0 or $this->start === 0){
|
||||
if(--$this->timingDepth !== 0 or $this->start == 0){
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user