spit out runtime for graph.php when debugging

git-svn-id: http://www.observium.org/svn/observer/trunk@2930 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-03-27 13:59:31 +00:00
parent c01b6b87b2
commit 8c0392ffae

View File

@@ -1,5 +1,15 @@
<?php
function utime()
{
$time = explode(" ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();
include_once("Net/IPv4.php");
if (isset($_GET['debug']))
@@ -41,4 +51,9 @@ if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs'])
include("includes/graphs/graph.inc.php");
$end = utime(); $run = $end - $start;;
if($debug) { echo("runtime ".$run." secs"); }
?>