You are here

public function TimeDataCollector::getInitTime in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php \Symfony\Component\HttpKernel\DataCollector\TimeDataCollector::getInitTime()

Gets the initialization time.

This is the time spent until the beginning of the request handling.

Return value

float The elapsed time

File

vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php, line 110

Class

TimeDataCollector
TimeDataCollector.

Namespace

Symfony\Component\HttpKernel\DataCollector

Code

public function getInitTime() {
  if (!isset($this->data['events']['__section__'])) {
    return 0;
  }
  return $this->data['events']['__section__']
    ->getOrigin() - $this
    ->getStartTime();
}