From 6fe8d2457fa96e4eff0f67379b7def24c8d47664 Mon Sep 17 00:00:00 2001 From: osmiy Date: Mon, 22 May 2006 09:48:19 +0000 Subject: - fixed authorisation (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@2870 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/include/copt.lib.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 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 38f915b2..3154867e 100644 --- a/frontends/php/include/copt.lib.php +++ b/frontends/php/include/copt.lib.php @@ -104,15 +104,21 @@ if(defined('USE_PROFILING')) /* protected static $starttime[]=array(); */ - /* protected static */ function getmicrotime() - { - list($usec, $sec) = explode(' ',microtime()); - return ((float)$usec + (float)$sec); + /* protected static */ function getmicrotime() { +if(defined('USE_TIME_PROF')) { + list($usec, $sec) = explode(' ',microtime()); return ((float)$usec + (float)$sec); +}else { + return 0; +} } - /* protected static */ function getmemoryusage() - { + + /* protected static */ function getmemoryusage() { +if(defined('USE_MEM_PROF')) { return memory_get_usage('memory_limit'); +} else { + return 0; +} } /* protected static */ function mem2str($size) @@ -132,14 +138,8 @@ if(defined('USE_PROFILING')) if(is_null($type)) $type='global'; -if(defined('USE_TIME_PROF')) -{ $starttime[$type] = COpt::getmicrotime(); -} -if(defined('USE_MEM_PROF')) -{ $memorystamp[$type] = COpt::getmemoryusage(); -} if(defined('USE_SQLREQUEST_PROF')) { $sqlmark[$type] = count($sqlrequests); -- cgit