next up previous contents
Next: pack and unpack Up: A Few Perl Functions Previous: sort   Contents

sleep

The sleep function simply causes your program to do nothing for a specified amount of time. The single argument to sleep is the number of seconds that the program should sleep; if called with no arguments, your program will sleep forever. The return value from sleep is the number of seconds for which the program actually slept. With the ever increasing speed of computers and the networks that connect them, the sleep function is useful to insure that your program doesn't put too many demands on other programs or computers, or that your programs don't produce too much printed output.



Phil Spector 2002-10-18