You are here

function timer_start in Drupal 5

Same name and namespace in other branches
  1. 4 includes/bootstrap.inc \timer_start()
  2. 6 includes/bootstrap.inc \timer_start()
  3. 7 includes/bootstrap.inc \timer_start()

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.

1 call to timer_start()
_drupal_bootstrap in includes/bootstrap.inc

File

includes/bootstrap.inc, line 115
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'] = (double) $usec + (double) $sec;
  $timers[$name]['count'] = isset($timers[$name]['count']) ? ++$timers[$name]['count'] : 1;
}