You are here

public function PerformanceTimingData::getDomTiming in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getDomTiming()
  2. 8 webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getDomTiming()
  3. 8.2 webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getDomTiming()

Return value

int

File

webprofiler/src/Frontend/PerformanceTimingData.php, line 73

Class

PerformanceTimingData
Class PerformanceTimingData.

Namespace

Drupal\webprofiler\Frontend

Code

public function getDomTiming() {
  if (isset($this->data['loadEventStart']) && isset($this->data['responseEnd'])) {
    return $this->data['loadEventStart'] - $this->data['responseEnd'];
  }
  else {
    return 0;
  }
}