summaryrefslogtreecommitdiff
path: root/it_auto_prepend.php
diff options
context:
space:
mode:
Diffstat (limited to 'it_auto_prepend.php')
-rw-r--r--it_auto_prepend.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/it_auto_prepend.php b/it_auto_prepend.php
index d683116..d946e78 100644
--- a/it_auto_prepend.php
+++ b/it_auto_prepend.php
@@ -19,6 +19,7 @@
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+$GLOBALS['ULTRATIME'] = gettimeofday();
unset($GLOBALS['IT_SYNTAXCONVERTER_DIR']); # Security measure for register_globals on
#$debug_itclassloader = true;
@@ -35,6 +36,7 @@ function it_initialize()
if (!$it_initrecursion++)
{
+ register_shutdown_function('it_shutdown');
$error_reporting = error_reporting();
error_reporting($error_reporting & ~E_NOTICE); # ITools is not (unpatched) E_NOTICE safe
$it_path = dirname(__FILE__);
@@ -232,3 +234,9 @@ function it_errorhandler($errno, $errstr, $errfile, $errline, $errcontext)
return $result; # True means do not execute standard PHP error handler
}
+
+function it_shutdown()
+{
+ if (isset($GLOBALS['debug_timerlog']) && !empty($GLOBALS['ULTRATIMERLOG']))
+ it::log('timerlog', $_SERVER['REQUEST_URI'] . "\t" . substr($GLOBALS['ULTRATIMERLOG'], 1));
+}