summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorBenjamin Smith <bsmith@cabbage.org.uk>2007-08-02 19:28:05 +0100
committerAbhijit Menon-Sen <ams@wiw.org>2007-08-03 00:34:18 +0000
commit2bc69794da02265ed75b5692af747de1102c7519 (patch)
tree043ba57b4dc704883efc633a97764c20041f63b4 /pod/perlfunc.pod
parentd6adb841ee12c8e81631147a24128b6c0f39c3e5 (diff)
downloadperl-2bc69794da02265ed75b5692af747de1102c7519.tar.gz
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
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod23
1 files changed, 12 insertions, 11 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 1afa901c76..13bca13f44 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<syscall> 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<syscall> interface to access setitimer(2) if
+your system supports it. See L<perlfaq8> for details.
It is usually a mistake to intermix C<alarm> and C<sleep> calls.
(C<sleep> may be internally implemented in your system with C<alarm>)
@@ -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<syscall> interface to access setitimer(2) if your system supports
-it, or else see L</select> 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<syscall> interface to access setitimer(2) if
+your system supports it. See L<perlfaq8> for details.
See also the POSIX module's C<pause> function.