diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-24 06:35:49 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2006-04-24 06:35:49 +0000 |
| commit | db3363b1098d995fb45813eba9954f538b59686a (patch) | |
| tree | 1c6fd54561f8fc9d72b876c4982e3719947305c6 /frontends/php/include/copt.lib.php | |
| parent | e635b3d6db0636d0c252e4f0fcadb7a8fd6bd24d (diff) | |
| download | zabbix-db3363b1098d995fb45813eba9954f538b59686a.tar.gz zabbix-db3363b1098d995fb45813eba9954f538b59686a.tar.xz zabbix-db3363b1098d995fb45813eba9954f538b59686a.zip | |
- minor change (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@2769 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/copt.lib.php')
| -rw-r--r-- | frontends/php/include/copt.lib.php | 15 |
1 files changed, 11 insertions, 4 deletions
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 "<br/>\nTime to execute (".$type."): ". bcsub($endtime,$starttime[$type],6)." seconds!\n<br/>"; } } +} +else +{ + class COpt + { + /* public static */ function profiling_start($type=NULL) {} + /* public static */ function profiling_stop($type=NULL) {} + } +} ?> |
