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.