I sometimes use microtime() to see how fast parts of my script are running. It is usually something along the lines of this:
PHP Code:
$start = microtime(true);
// code block
$time = microtime(true) - $start; echo '<p>',round($time, 4),' seconds.</p>';
The weird thing is that sometimes when I view the page I will get negative times, like -0.1373, and other times I get positive times, like 0.095. This occurs just from simple browsing and refreshing, and without changing the code. Does anyone have any clues as to why this might be happening?
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
|