timer.php
<?
function timer_start()
{
global $starttime;
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$starttime = $m_time;
return;
}
function timer_end()
{
global $starttime;
$round = 6;// The number of decimal places to round the micro time to.
$m_time = explode(" ",microtime());
$m_time = $m_time[0] + $m_time[1];
$endtime = $m_time;
$totaltime = ($endtime - $starttime);
echo "Time to generate page:". round($totaltime,$round) ." seconds";
return;
}
#timer_start();
#echo "tjohej<br>";
#require_once('/home/erik/bt/include/secrets.php');
#mysql_connect(':/var/run/mysqld/mysqld.sock', $mysql_user, $mysql_pass);
#mysql_select_db($mysql_db);
#timer_end();
?>