You are here

public function PerformanceTimingData::getDNSTiming in Devel 4.x

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

Return value

int

File

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

Class

PerformanceTimingData
Class PerformanceTimingData.

Namespace

Drupal\webprofiler\Frontend

Code

public function getDNSTiming() {
  if (isset($this->data['domainLookupEnd']) && isset($this->data['domainLookupStart'])) {
    return $this->data['domainLookupEnd'] - $this->data['domainLookupStart'];
  }
  else {
    return 0;
  }
}