function timer_read

cis7 bootstrap.inc timer_read($name)
cle7 bootstrap.inc timer_read($name)
elmsmedia7 bootstrap.inc timer_read($name)
icor7 bootstrap.inc timer_read($name)
meedjum_blog7 bootstrap.inc timer_read($name)
mooc7 bootstrap.inc timer_read($name)

Reads the current timer value without stopping the timer.

Parameters

$name: The name of the timer.

Return value

The current timer value in ms.

6 calls to timer_read()
devel_timer in sites/all/modules/ulmus/devel/devel.module
Displays page execution time at the bottom of the page.
drupal_http_request in includes/common.inc
Performs an HTTP request.
entity_iframe_statistics_exit in sites/all/modules/elmsln_contrib/entity_iframe/modules/entity_iframe_statistics/entity_iframe_statistics.module
Implements hook_exit().
httprl.examples.php in sites/all/modules/ulmus/httprl/examples/httprl.examples.php
HTTP Parallel Request Library code examples.
statistics_exit in modules/statistics/statistics.module
Implements hook_exit().

... See full list

File

includes/bootstrap.inc, line 476
Functions that need to be loaded on every Drupal request.

Code

function timer_read($name) {
  global $timers;

  if (isset($timers[$name]['start'])) {
    $stop = microtime(TRUE);
    $diff = round(($stop - $timers[$name]['start']) * 1000, 2);

    if (isset($timers[$name]['time'])) {
      $diff += $timers[$name]['time'];
    }
    return $diff;
  }
  return $timers[$name]['time'];
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.