On May 30, Craig Moynes/Markham/IBM said:
>Is there anyway to sleep for less than a second using the default
>installation of perl ?
friday:~ $ perldoc -q sleep
=head1 Found in /usr/local/lib/perl5/5.00502/pod/perlfaq8.pod
=head2 How can I sleep() or alarm() for under a second?
If you want finer granularity than the 1 second that the sleep()
function provides, the easiest way is to use the select() function as
documented in L<perlfunc/"select">. If your system has itimers and
syscall() support, you can check out the old example in
http://www.perl.com/CPAN/doc/misc/ancient/tutorial/eg/itimers.pl .
I refer you then to perlfunc:
friday:~ $ perldoc -f select
[...]
You can effect a sleep of 250 milliseconds this way:
select(undef, undef, undef, 0.25);
[...]
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
Are you a Monk? http://www.perlmonks.com/ http://forums.perlguru.com/
Perl Programmer at RiskMetrics Group, Inc. http://www.riskmetrics.com/
Acacia Fraternity, Rensselaer Chapter. Brother #734
** I need a publisher for my book "Learning Perl's Regular Expressions" **