Sleep: Difference between revisions

168 bytes added ,  9 years ago
Line 1,049:
nanosleep $nanoseconds;
print "Awake!\n";</lang>
 
It's also possible to sleep for fractional seconds by abusing the select function:
<lang perl>say "Sleeping...";
select undef, undef, undef, 0.5;
say "Awake!";</lang>
 
=={{header|Perl 6}}==
Anonymous user