pocketmine\event\TimingsHandler::startTiming PHP Метод

startTiming() публичный Метод

public startTiming ( )
    public function startTiming()
    {
        if (PluginManager::$useTimings and ++$this->timingDepth === 1) {
            $this->start = microtime(true);
            if ($this->parent !== null and ++$this->parent->timingDepth === 1) {
                $this->parent->start = $this->start;
            }
        }
    }

Usage Example

Пример #1
0
 /**
  * @param Event $event
  */
 public function callEvent(Event $event)
 {
     if ($event instanceof Cancellable and $event->isCancelled() and $this->isIgnoringCancelled()) {
         return;
     }
     $this->timings->startTiming();
     $this->executor->execute($this->listener, $event);
     $this->timings->stopTiming();
 }
All Usage Examples Of pocketmine\event\TimingsHandler::startTiming