Fixed other invisibility issues

This commit is contained in:
Shoghi Cervantes
2015-06-04 16:51:48 +02:00
parent 05dbf7b47f
commit 71490f60f2
8 changed files with 32 additions and 22 deletions

View File

@ -134,6 +134,9 @@ abstract class Timings{
self::$timerEntityAIMove = new TimingsHandler("** livingEntityAIMove");
self::$timerEntityTickRest = new TimingsHandler("** livingEntityTickRest");
PluginManager::$pluginParentTimer = new TimingsHandler("** Plugins");
self::$schedulerSyncTimer = new TimingsHandler("** Scheduler - Sync Tasks", PluginManager::$pluginParentTimer);
self::$schedulerAsyncTimer = new TimingsHandler("** Scheduler - Async Tasks");

View File

@ -49,7 +49,7 @@ class TimingsHandler{
*/
public function __construct($name, TimingsHandler $parent = null){
$this->name = $name;
if($parent instanceof TimingsHandler){
if($parent !== null){
$this->parent = $parent;
}
@ -125,7 +125,7 @@ class TimingsHandler{
public function startTiming(){
if(PluginManager::$useTimings and ++$this->timingDepth === 1){
$this->start = microtime(true);
if($this->parent instanceof TimingsHandler and ++$this->parent->timingDepth === 1){
if($this->parent !== null and ++$this->parent->timingDepth === 1){
$this->parent->start = $this->start;
}
}
@ -143,7 +143,7 @@ class TimingsHandler{
++$this->curCount;
++$this->count;
$this->start = 0;
if($this->parent instanceof TimingsHandler){
if($this->parent !== null){
$this->parent->stopTiming();
}
}