View Single Post
Old 11-09-2008, 02:21 AM   #1 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default what is the purpose of microtime() ?

i was looking at the php help page and found this script below, apparently its supposed to be a timer.. but i did a echo of microtime and found a bunch of gibberish float values. whats its purpose?? thanks

Code:
<?php
$time_start = microtime(true);

// Sleep for a while
usleep(100);

$time_end = microtime(true);
$time = $time_end - $time_start;

echo "Did nothing in $time seconds\n";
?>
__________________
no signature set
sarmenhb is offline  
Reply With Quote