Skip navigation
Help

timer_start

6 bootstrap.inc timer_start($name)
7 bootstrap.inc timer_start($name)

Start 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.

2 calls to timer_start()

File

drupal/includes/bootstrap.inc, line 229
Functions that need to be loaded on every Drupal request.

Code

function timer_start($name) {
  global $timers;

  list($usec, $sec) = explode(' ', microtime());
  $timers[$name]['start'] = (float) $usec + (float) $sec;
  $timers[$name]['count'] = isset($timers[$name]['count']) ? ++$timers[$name]['count'] : 1;
}