in reply to perl's sleep function

perldoc -f sleep

Have you tried that?