Just glancing at this - and the note from over a year ago with a implementation for windows.. with 5.0.0 and higher it would be simplier to just do something like......
<?php
if (!function_exists('time_nanosleep')) {
function time_nanosleep($seconds, $nanoseconds) {
sleep($seconds);
usleep(round($nanoseconds/100));
return true;
}
}
?>
....off the top of my head - obviously simple enough there should be no mistakes.. but those are the ones that always seem to get ya :( .....