Posted by Noozer on 03/24/06 12:04
I've got a PHP question (it's my first PHP script)... Hopefully there's a
quick answer.
Why does the following show a 17 hour difference when the "Some Stuff" code
actually takes only 42 seconds?
For output I get:
Elapsed time was 17:00.42.
<?php
$start_time = mktime();
//42 seconds of some stuff happening here
$finish_time = mktime();
echo "Elapsed time was ".(date("G:i.s",$finish_time-$start_time)).".";
?>
Navigation:
[Reply to this message]
|