int usleep ( int $micro_seconds )
usleep() delays the program execution for the specified number of micro-seconds
※ available F/W version : all
Returns 0, PHP error on error
<?php
$pid_st0 = pid_open("/mmap/st0");
pid_ioctl($pid_st0, "set mode free");
$sleeping_time = 1000000;
echo "sleeping for $sleeping_time micro-seconds...\r\n"; // OUTPUT: sleeping for 1000000 micro-seconds...
pid_ioctl($pid_st0, "start"); // timer start
usleep($sleeping_time);
$tick = pid_ioctl($pid_st0, "get count");
printf("slept time: %d ms\r\n", $tick); // OUTPUT: slept time: 1000 ms
?>
This function is identical to the PHP group’s usleep() function except error handling. If the specified number of seconds is negative, the PHP group’s usleep() function generates a E_WARNING.