Microsoft Word - Core PHP Programming Using PHP to Build Dynamic Web Sites

(singke) #1

sleep(integer seconds)


The sleep function causes execution to pause for the given number of seconds.


<?
print(microtime());
sleep(3);
print("
\n");
print(microtime());
?>


usleep(integer microseconds)


The usleep function causes execution to pause for the given number of microseconds.
There are a million microseconds in a second.


<?
print(microtime());
usleep(30);
print("
\n");
print(microtime());
?>

Free download pdf