Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

perlfunc:sleep

by gods (Initiate)
on Aug 24, 1999 at 22:43 UTC ( [id://357]=perlfunc: print w/replies, xml ) Need Help??

sleep

See the current Perl documentation for sleep.

Here is our local, out-dated (pre-5.6) version:


sleep - block for some number of seconds


sleep EXPR

sleep


Causes the script to sleep for EXPR seconds, or forever if no EXPR. May be interrupted if the process receives a signal such as SIGALRM. Returns the number of seconds actually slept. You probably cannot mix alarm() and sleep() calls, because sleep() is often implemented using alarm().

On some older systems, it may sleep up to a full second less than what you requested, depending on how it counts seconds. Most modern systems always sleep the full amount. They may appear to sleep longer than that, however, because your process might not be scheduled right away in a busy multitasking system.

For delays of finer granularity than one second, you may use Perl's syscall() interface to access setitimer(2) if your system supports it, or else see select() above.

See also the POSIX module's sigpause() function.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-03-28 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found