public static function Timer::start

Starts the timer with the specified name.

If you start and stop the same timer multiple times, the measured intervals will be accumulated.

Parameters

$name: The name of the timer.

3 calls to Timer::start()
TimerUnitTest::testTimer in drupal/core/tests/Drupal/Tests/Component/Utility/TimerUnitTest.php
Tests Timer::read() time accumulation accuracy across multiple restarts.
timer_start in drupal/core/includes/bootstrap.inc
_drupal_bootstrap_configuration in drupal/core/includes/bootstrap.inc
Sets up the script environment and loads settings.php.

File

drupal/core/lib/Drupal/Component/Utility/Timer.php, line 26
Contains \Drupal\Component\Utility\Timer.

Class

Timer
Provides helpers to use timers throughout a request.

Namespace

Drupal\Component\Utility

Code

public static function start($name) {
  static::$timers[$name]['start'] = microtime(TRUE);
  static::$timers[$name]['count'] = isset(static::$timers[$name]['count']) ? ++static::$timers[$name]['count'] : 1;
}