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.
6 calls to timer_start()
- BootstrapTimerTestCase::testTimer in 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 modules/
simpletest/ tests/ common.test - drupal_cron_run in includes/
common.inc - Executes a cron run when called.
- drupal_http_request in includes/
common.inc - Performs an HTTP request.
- _batch_process in includes/
batch.inc - Processes sets in a batch.
File
-
includes/
bootstrap.inc, line 481
Code
function timer_start($name) {
global $timers;
$timers[$name]['start'] = microtime(TRUE);
$timers[$name]['count'] = isset($timers[$name]['count']) ? ++$timers[$name]['count'] : 1;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.