Hey what's up? I have a quick question for ya'll. I am currently using this function:
<?php
function DispElapsedTime($start_time)
{
// calculate elapsed time (in seconds!)
$diff = time()-$start_time;
$daysDiff = floor($diff/60/60/24);
$diff -= $daysDiff*60*60*24;
$hrsDiff = floor($diff/60/60);
$diff -= $hrsDiff*60*60;
$minsDiff = floor($diff/60);
$diff -= $minsDiff*60;
$secsDiff = $diff;
echo "<div align='center'><span class='style1'>Load Time:</span> $secsDiff Seconds </div>";
}
?>
Which works great! I am passing $time in as $time=time(); No problems if the page takes over a second to load. I just need a more exact method. I know that I could use like $start_time = time(); and $end_time = time(); and then subtract the two. However, to convert that time to something that makes sense is ideal. I am working in PHP4. I tried someone else's method and it didn't work at all. So, that is when I look here. Thanks in advance. So basically I need a unix timestamp converter. Thanks!
Chad R. Smith