From: Benjamin Smith Date: Thu, 2 Aug 2007 18:28:05 +0000 (+0100) Subject: Applied after word-wrapping: X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2bc69794da02265ed75b5692af747de1102c7519;p=p5sagit%2Fp5-mst-13.2.git Applied after word-wrapping: Subject: [PATCH] Time::HiRes is a better suggestion than setitimer in perlfunc. Message-Id: <20070802172804.GA7856@vtrl.co.uk> p4raw-id: //depot/perl@31675 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 1afa901..13bca13 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -445,12 +445,12 @@ previous timer, and an argument of C<0> may be supplied to cancel the previous timer without starting a new one. The returned value is the amount of time remaining on the previous timer. -For delays of finer granularity than one second, you may use Perl's -four-argument version of select() leaving the first three arguments -undefined, or you might be able to use the C interface to -access setitimer(2) if your system supports it. The Time::HiRes -module (from CPAN, and starting from Perl 5.8 part of the standard -distribution) may also prove useful. +For delays of finer granularity than one second, the Time::HiRes module +(from CPAN, and starting from Perl 5.8 part of the standard +distribution) provides ualarm(). You may also use Perl's four-argument +version of select() leaving the first three arguments undefined, or you +might be able to use the C interface to access setitimer(2) if +your system supports it. See L for details. It is usually a mistake to intermix C and C calls. (C may be internally implemented in your system with C) @@ -5108,11 +5108,12 @@ always sleep the full amount. They may appear to sleep longer than that, however, because your process might not be scheduled right away in a busy multitasking system. -For delays of finer granularity than one second, you may use Perl's -C interface to access setitimer(2) if your system supports -it, or else see L above. The Time::HiRes module (from CPAN, -and starting from Perl 5.8 part of the standard distribution) may also -help. +For delays of finer granularity than one second, the Time::HiRes module +(from CPAN, and starting from Perl 5.8 part of the standard +distribution) provides usleep(). You may also use Perl's four-argument +version of select() leaving the first three arguments undefined, or you +might be able to use the C interface to access setitimer(2) if +your system supports it. See L for details. See also the POSIX module's C function.