You are here

public function PerformanceTimingData::getTCPTiming in Devel 8.2

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

Return value

int

File

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

Class

PerformanceTimingData
Class PerformanceTimingData

Namespace

Drupal\webprofiler\Frontend

Code

public function getTCPTiming() {
  if (isset($this->data['connectEnd']) && isset($this->data['connectStart'])) {
    return $this->data['connectEnd'] - $this->data['connectStart'];
  }
  else {
    return 0;
  }
}