timings: populate missing return type information

This commit is contained in:
Dylan K. Taylor 2020-01-19 17:12:13 +00:00
parent f5a18df835
commit 11cae2f0c0
2 changed files with 25 additions and 0 deletions

View File

@ -105,6 +105,9 @@ abstract class Timings{
/** @var TimingsHandler[] */
public static $pluginTaskTimingMap = [];
/**
* @return void
*/
public static function init(){
if(self::$initialized){
return;

View File

@ -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)]);
}