From: Jarkko Hietaniemi Date: Sun, 30 Mar 2003 15:54:35 +0000 (+0000) Subject: Upgrade to Time::HiRes 1.44. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0be47ac6ef3026eb6eaaf22fb128d8e2d947e0c7;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Time::HiRes 1.44. p4raw-id: //depot/perl@19094 --- diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes index d4253c0..b55b848 100644 --- a/ext/Time/HiRes/Changes +++ b/ext/Time/HiRes/Changes @@ -1,5 +1,11 @@ Revision history for Perl extension Time::HiRes. +1.44 + - add hints/irix.pl to turn off overly POSIX flags that + cause hide struct timespec to be hidden (and compilation + to fail) + - documentation tweaks + 1.43 - add c:/temp to the list of temp directories to probe so that cygwin (and win*?) builds are happy. This was diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index eb4e416..6c179a9 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -15,7 +15,7 @@ require DynaLoader; d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep); -$VERSION = '1.43'; +$VERSION = '1.44'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -83,31 +83,35 @@ Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers =head1 DESCRIPTION -The C module implements a Perl interface to the usleep, -ualarm, gettimeofday, and setitimer/getitimer system calls. See the -EXAMPLES section below and the test scripts for usage; see your system -documentation for the description of the underlying nanosleep or usleep, -ualarm, gettimeofday, and setitimer/getitimer calls. +The Time::HiRes module implements a Perl interface to the usleep, +ualarm, gettimeofday, and setitimer/getitimer system calls, in other +words, high resolution time and timers. See the EXAMPLES section below +and the test scripts for usage; see your system documentation for the +description of the underlying nanosleep or usleep, ualarm, +gettimeofday, and setitimer/getitimer calls. -If your system lacks gettimeofday(2) or an emulation of it you don't +If your system lacks gettimeofday() or an emulation of it you don't get gettimeofday() or the one-arg form of tv_interval(). If you don't -have nanosleep() or usleep(3) or select(2) you don't get Time::HiRes::usleep() -or sleep(). If your system don't have ualarm(3) or setitimer(2) you -don't get Time::HiRes::ualarm() or alarm(). +have any of the nanosleep() or usleep() or select() you don't get +Time::HiRes::usleep() or Time::HiRes::sleep(). If your system don't +have either ualarm() or setitimer() you don't get +Time::HiRes::ualarm() or Time::HiRes::alarm(). If you try to import an unimplemented function in the C statement it will fail at compile time. If your subsecond sleeping is implemented with nanosleep() instead of usleep(), you can mix subsecond sleeping with signals since -nanosleep() does not use signals. This, however, is unportable -behavior, and you should first check for the truth value of -C<&Time::HiRes::d_nanosleep> to see whether you have nanosleep, -and then read carefully your nanosleep() C API documentation for -any peculiarities. (There is no separate interface to call nanosleep(); -just use Time::HiRes::sleep() or usleep() with small enough values. Also, -think twice whether using nanosecond accuracies in a Perl program is what -you should be doing.) +nanosleep() does not use signals. This however is unportable, and you +should first check for the truth value of &Time::HiRes::d_nanosleep to +see whether you have nanosleep, and then read carefully your +nanosleep() C API documentation for any peculiarities. (There is no +separate interface to call nanosleep(); just use Time::HiRes::sleep() +or Time::HiRes::usleep() with small enough values.) + +Unless using nanosleep for mixing sleeping with signals, also give +some thought to whether Perl is the tool you should be using for work +requiring nanosecond accuracies. The following functions can be imported from this module. No functions are exported by default. @@ -116,7 +120,7 @@ No functions are exported by default. =item gettimeofday () -In array context returns a 2 element array with the seconds and +In array context returns a two-element array with the seconds and microseconds since the epoch. In scalar context returns floating seconds like Time::HiRes::time() (see below). @@ -128,12 +132,12 @@ unlike the usleep system call. See also Time::HiRes::sleep() below. =item ualarm ( $useconds [, $interval_useconds ] ) -Issues a ualarm call; interval_useconds is optional and will be 0 if -unspecified, resulting in alarm-like behaviour. +Issues a ualarm call; the $interval_useconds is optional and +will be zero if unspecified, resulting in alarm-like behaviour. =item tv_interval -C +tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] ) Returns the floating seconds between the two times, which should have been returned by gettimeofday(). If the second argument is omitted, @@ -142,62 +146,63 @@ then the current time is used. =item time () Returns a floating seconds since the epoch. This function can be -imported, resulting in a nice drop-in replacement for the C