You are here

public function PerformanceTimingData::getDataTiming in Devel 4.x

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

Return value

int

File

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

Class

PerformanceTimingData
Class PerformanceTimingData.

Namespace

Drupal\webprofiler\Frontend

Code

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