About sleep functions in Perl

Source: Internet
Author: User

About sleep functions in Perl

Sleep expr
Sleep
This function allows the script to sleep for expr seconds. If there is no expr, it will be permanently sleep and will return sleep
Number of seconds. You can send a sigalrm Method to the process to interrupt sleep. In some vintage
In the system, it may take less than one second than the description you requested. The actual situation depends on how it calculates the second.
. Most modern systems fall asleep in seconds. However, they are likely to sleep on these systems.
It takes a longer time, because on a busy multi-task system, your system may not be able to get it immediately.
Scheduling. If possible, the Select (wait for file descriptor) Call can give you better resolution. You
You can also use syscall to call getitimer (2) and setitimer (2) supported by some UNIX systems)
Process. You should not mix alarm and sleep, because sleep is usually implemented using alarm.
.
See the sigpause function of the posixe module.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.