You are here

protected function StopwatchEvent::getNow in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getNow()
  2. 8.2 webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getNow()
  3. 4.x webprofiler/src/Stopwatch.php \Drupal\webprofiler\StopwatchEvent::getNow()

Return the current time relative to origin.

Return value

float Time in ms

2 calls to StopwatchEvent::getNow()
StopwatchEvent::start in webprofiler/src/Stopwatch.php
Starts a new event period.
StopwatchEvent::stop in webprofiler/src/Stopwatch.php
Stops the last started event period.

File

webprofiler/src/Stopwatch.php, line 464

Class

StopwatchEvent
Class StopwatchEvent

Namespace

Drupal\webprofiler

Code

protected function getNow() {
  return $this
    ->formatTime(microtime(TRUE) * 1000 - $this->origin);
}