public static function Timer::start in Service Container 7.2
Same name and namespace in other branches
- 7 lib/Drupal/Component/Utility/Timer.php \Drupal\Component\Utility\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.
File
- lib/
Drupal/ Component/ Utility/ Timer.php, line 28 - Contains \Drupal\Component\Utility\Timer.
Class
- Timer
- Provides helpers to use timers throughout a request.
Namespace
Drupal\Component\UtilityCode
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;
}