public function TimeDataCollector::getDuration

Gets the request elapsed time.

Return value

float The elapsed time

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php, line 79

Class

TimeDataCollector
TimeDataCollector.

Namespace

Symfony\Component\HttpKernel\DataCollector

Code

public function getDuration() {
  $lastEvent = $this->data['events']['__section__'];
  return $lastEvent
    ->getOrigin() + $lastEvent
    ->getDuration() - $this
    ->getStartTime();
}