mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 20:07:09 +00:00
TimingsHandler: added format version
This commit is contained in:
parent
bf84caa02c
commit
1683aa681d
@ -32,6 +32,8 @@ use function implode;
|
|||||||
use function spl_object_id;
|
use function spl_object_id;
|
||||||
|
|
||||||
class TimingsHandler{
|
class TimingsHandler{
|
||||||
|
private const FORMAT_VERSION = 1;
|
||||||
|
|
||||||
private static bool $enabled = false;
|
private static bool $enabled = false;
|
||||||
private static int $timingStart = 0;
|
private static int $timingStart = 0;
|
||||||
|
|
||||||
@ -88,6 +90,7 @@ class TimingsHandler{
|
|||||||
|
|
||||||
$result[] = "# Entities " . $entities;
|
$result[] = "# Entities " . $entities;
|
||||||
$result[] = "# LivingEntities " . $livingEntities;
|
$result[] = "# LivingEntities " . $livingEntities;
|
||||||
|
$result[] = "# FormatVersion " . self::FORMAT_VERSION;
|
||||||
|
|
||||||
$sampleTime = hrtime(true) - self::$timingStart;
|
$sampleTime = hrtime(true) - self::$timingStart;
|
||||||
$result[] = "Sample time $sampleTime (" . ($sampleTime / 1000000000) . "s)";
|
$result[] = "Sample time $sampleTime (" . ($sampleTime / 1000000000) . "s)";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user