int sleep ( int $seconds )
sleep() delays the program execution for the specified number of 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 = 3;
echo "sleeping for $sleeping_time seconds...\r\n"; // OUTPUT: sleeping for 3 seconds...
pid_ioctl($pid_st0, "start");
sleep($sleeping_time);
$tick = pid_ioctl($pid_st0, "get count");
printf("slept time: %d milli seconds\r\n", $tick); // OUTPUT: slept time: 3000 milli seconds
?>
This function is identical to the PHP group’s sleep() function except error handling. If the specified number of seconds is negative, the PHP group’s sleep() function generates a E_WARNING.