From db3363b1098d995fb45813eba9954f538b59686a Mon Sep 17 00:00:00 2001 From: osmiy Date: Mon, 24 Apr 2006 06:35:49 +0000 Subject: - minor change (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2769 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/copt.lib.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'frontends/php/include/copt.lib.php') diff --git a/frontends/php/include/copt.lib.php b/frontends/php/include/copt.lib.php index aaebaab5..c3fe8a60 100644 --- a/frontends/php/include/copt.lib.php +++ b/frontends/php/include/copt.lib.php @@ -88,6 +88,8 @@ //define("USE_PROFILING",1); +if(defined('USE_PROFILING')) +{ $starttime[]=array(); class COpt @@ -101,8 +103,6 @@ } /* public static */ function profiling_start($type=NULL) { - if(!defined('USE_PROFILING')) return; - global $starttime; if(is_null($type)) $type="global"; @@ -110,8 +110,6 @@ } /* public static */ function profiling_stop($type=NULL) { - if(!defined('USE_PROFILING')) return; - global $starttime; $endtime = COpt::getmicrotime(); @@ -120,5 +118,14 @@ echo "
\nTime to execute (".$type."): ". bcsub($endtime,$starttime[$type],6)." seconds!\n
"; } } +} +else +{ + class COpt + { + /* public static */ function profiling_start($type=NULL) {} + /* public static */ function profiling_stop($type=NULL) {} + } +} ?> -- cgit