public function PerformanceTimingData::getTtfbTiming in Devel 8.2
Same name and namespace in other branches
- 8.3 webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getTtfbTiming()
- 8 webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getTtfbTiming()
- 4.x webprofiler/src/Frontend/PerformanceTimingData.php \Drupal\webprofiler\Frontend\PerformanceTimingData::getTtfbTiming()
Return value
int
File
- webprofiler/
src/ Frontend/ PerformanceTimingData.php, line 49
Class
- PerformanceTimingData
- Class PerformanceTimingData
Namespace
Drupal\webprofiler\FrontendCode
public function getTtfbTiming() {
if (isset($this->data['responseStart']) && isset($this->data['connectEnd'])) {
return $this->data['responseStart'] - $this->data['connectEnd'];
}
else {
return 0;
}
}