timer_stop

Definition

timer_stop($name)
includes/bootstrap.inc, line 72

Description

Stop the timer with the specified name.

Parameters

name The name of the timer.

Return value

A timer array. The array contains the number of times the timer has been started and stopped (count) and the accumulated timer value in ms (time).

Code

<?php
function timer_stop($name) {
  global $timers;

  $timers[$name]['time'] = timer_read($name);
  unset($timers[$name]['start']);

  return $timers[$name];
}
?>
 
 

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.