You are here

function crumbs_benchmark in Crumbs, the Breadcrumbs suite 6.2

Same name and namespace in other branches
  1. 7 crumbs.module \crumbs_benchmark()
1 call to crumbs_benchmark()
crumbs_debug_page in ./crumbs.debug.inc

File

./crumbs.module, line 193

Code

function crumbs_benchmark($label = NULL, $dpm = FALSE) {
  static $_t;
  $t = microtime(TRUE);
  if (isset($_t) && isset($label)) {
    $str = 'Duration: ' . number_format(1000 * ($t - $_t), 3) . ' ms for ' . $label;
    if ($dpm) {
      dpm($str);
    }
  }
  $_t = $t;
  return $str;
}