function timer_start
7.x bootstrap.inc | timer_start($name) |
6.x bootstrap.inc | timer_start($name) |
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.
5 calls to timer_start()
- BootstrapTimerTestCase::testTimer in drupal-7.x/
modules/ simpletest/ tests/ bootstrap.test - Test timer_read() to ensure it properly accumulates time when the timer started and stopped multiple times.
- DrupalHTTPRequestTestCase::testDrupalHTTPRequest in drupal-7.x/
modules/ simpletest/ tests/ common.test - drupal_http_request in drupal-7.x/
includes/ common.inc - Performs an HTTP request.
- _batch_process in drupal-7.x/
includes/ batch.inc - Processes sets in a batch.
- _drupal_bootstrap_configuration in drupal-7.x/
includes/ bootstrap.inc - Sets up the script environment and loads settings.php.
File
- drupal-7.x/
includes/ bootstrap.inc, line 460 - Functions that need to be loaded on every Drupal request.
Code
function timer_start($name) {
global $timers;
$timers[$name]['start'] = microtime(TRUE);
$timers[$name]['count'] = isset($timers[$name]['count']) ? ++$timers[$name]['count'] : 1;
}