mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 08:49:42 +00:00
timings: populate missing return type information
This commit is contained in:
parent
f5a18df835
commit
11cae2f0c0
@ -105,6 +105,9 @@ abstract class Timings{
|
||||
/** @var TimingsHandler[] */
|
||||
public static $pluginTaskTimingMap = [];
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public static function init(){
|
||||
if(self::$initialized){
|
||||
return;
|
||||
|
@ -43,6 +43,8 @@ class TimingsHandler{
|
||||
|
||||
/**
|
||||
* @param resource $fp
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function printTimings($fp){
|
||||
fwrite($fp, "Minecraft" . PHP_EOL);
|
||||
@ -93,6 +95,9 @@ class TimingsHandler{
|
||||
return self::$timingStart;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public static function reload(){
|
||||
if(self::$enabled){
|
||||
foreach(self::$HANDLERS as $timings){
|
||||
@ -102,6 +107,11 @@ class TimingsHandler{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param bool $measure
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function tick(bool $measure = true){
|
||||
if(self::$enabled){
|
||||
if($measure){
|
||||
@ -157,6 +167,9 @@ class TimingsHandler{
|
||||
self::$HANDLERS[spl_object_hash($this)] = $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function startTiming(){
|
||||
if(self::$enabled){
|
||||
$this->internalStartTiming(microtime(true));
|
||||
@ -172,6 +185,9 @@ class TimingsHandler{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function stopTiming(){
|
||||
if(self::$enabled){
|
||||
$this->internalStopTiming(microtime(true));
|
||||
@ -200,6 +216,9 @@ class TimingsHandler{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function reset(){
|
||||
$this->count = 0;
|
||||
$this->curCount = 0;
|
||||
@ -210,6 +229,9 @@ class TimingsHandler{
|
||||
$this->timingDepth = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function remove(){
|
||||
unset(self::$HANDLERS[spl_object_hash($this)]);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user