MezData-Logo Lösungen Button :WEBPUBLISH: Zeitmessung

Microtime µs s: 0.20122800 1711712338 Time : 1711712338 Sekunden seit Januar 1 1970 00:00:00 GMT

Did nothing in 0.0011 seconds
<?php
  echo '<p>Microtime µs s: ' . microtime() . ' Time : ' . time() . ' Sekunden seit Januar 1 1970 00:00:00 GMT</p>';
function getzeit(){
    $mtime = microtime();
    $mtime = explode(' ',$mtime);
    return ($mtime[1] + $mtime[0]);
}
$time_start = getzeit();

usleep(1000); // Sleep for a while

$time = round(getzeit()- $time_start,5);

 echo "Did nothing in $time seconds\n";
?>				
© Oliver Mezger 02.03.2011 MezData.de Den Kontakt herstellen...