You should take into account, if you use the function replacement down here, the CPU will be in use of 99% for the time of execution...

(A little bit better in this situation is to let the 'full seconds' go by a normal sleep command (makes the thread sleep!, and uses minimum cpu))

<?php//THIS IS THE FUNCTION WE ARE TALKIN ABOUTfunction timeWait($microtime) {//optimizations added by me [start]//sleep the full secondssleep(intval($microtime));//set the microtime to only resleep the last part of the nanos$microtime = $microtime - intval($microtime);//optimizations added by me [end]

//THIS IS HOW WE CAN USE ITecho "Process started at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br>";timeWait(5.5); //With this call the system will wait 5 seconds and a half. You can use either integer or float.echo "Process completed at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.";?>

Your function is also useless, as the WinNT 32 kernel only functions at a minimum of about 10+ ms (1,000 us), rendering usleep() useless, because usleep uses the C function which is provided by the system (in this case, kernel32.dll).

You'll want to use a function that does not rely on the kernel, but rather something made for precise measurement:

//THIS IS HOW WE CAN USE ITecho "Process started at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.<br>";timeWait(5.5); //With this call the system will wait 5 seconds and a half. You can use either integer or float.echo "Process completed at " . date("H:i:s") . " and " . current(explode(" ",microtime())) . " nanoseconds.";?>