You are here

public function RuntimeMeasurement::start in Purge 8.3

Start measuring execution time.

Throws

\LogicException Thrown when already started before without calling ::stop().

Overrides RuntimeMeasurementInterface::start

File

src/Plugin/Purge/Purger/RuntimeMeasurement.php, line 36

Class

RuntimeMeasurement
Provides a execution time measurer for invalidation processing.

Namespace

Drupal\purge\Plugin\Purge\Purger

Code

public function start() {
  if (!is_null($this->start)) {
    throw new \LogicException("Already started, call ->stop() first!");
  }
  $this->start = microtime(TRUE);
}