timer_start

Versions
4.6
timer_start()
4.7 – 7
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.

Code

includes/bootstrap.inc, line 36

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.