From 343803afb9de3b27ba44d9594b6770f9c84d2e54 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Fri, 30 Aug 2013 08:39:11 +1000 Subject: More $config['debug'] improvements to time-related stuff --- mod.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mod.php') diff --git a/mod.php b/mod.php index 0e98c4eb..6ef4644d 100644 --- a/mod.php +++ b/mod.php @@ -8,6 +8,9 @@ require 'inc/functions.php'; require 'inc/mod/pages.php'; require 'inc/mod/auth.php'; +if ($config['debug']) + $parse_start_time = microtime(true); + // Fix for magic quotes if (get_magic_quotes_gpc()) { function strip_array($var) { @@ -156,8 +159,9 @@ foreach ($pages as $uri => $handler) { $debug['mod_page'] = array( 'req' => $query, 'match' => $uri, - 'handler' => $handler + 'handler' => $handler, ); + $debug['time']['parse_mod_req'] = '~' . round((microtime(true) - $parse_start_time) * 1000, 2) . 'ms'; } if (is_string($handler)) { -- cgit v1.3