diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-11-03 20:28:20 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2005-11-03 20:28:20 +0000 |
commit | 1a7d3a53c8d75f177742303cc1960c495ac8672f (patch) | |
tree | 42a41f14906956f62279f3ca0b909a879285472b /ext/Time/HiRes/HiRes.pm | |
parent | fcd9d3089367ef25a1979dbcb6de9c4be99bd205 (diff) | |
download | perl-1a7d3a53c8d75f177742303cc1960c495ac8672f.tar.gz |
Upgrade to Time-HiRes-1.78
p4raw-id: //depot/perl@25978
Diffstat (limited to 'ext/Time/HiRes/HiRes.pm')
-rw-r--r-- | ext/Time/HiRes/HiRes.pm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index 6064fb5939..cdafff5568 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -17,7 +17,7 @@ require DynaLoader; d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer d_nanosleep d_clock_gettime d_clock_getres); -$VERSION = '1.77'; +$VERSION = '1.78'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -359,9 +359,11 @@ of C<CLOCK_REALTIME>, see L</clock_gettime>. $SIG{VTALRM} = sub { print time, "\n" }; setitimer(ITIMER_VIRTUAL, 10, 2.5); - # How accurate we can be, really? - - my $reso = clock_gettime(CLOCK_REALTIME); + use Time::HiRes qw( clock_gettime clock_getres CLOCK_REALTIME ); + # Read the POSIX high resolution timer. + my $high = clock_getres(CLOCK_REALTIME); + # But how accurate we can be, really? + my $reso = clock_getres(CLOCK_REALTIME); =head1 C API @@ -414,7 +416,7 @@ platforms like Cygwin and MinGW) the Time::HiRes::time() may temporarily drift off from the system clock (and the original time()) by up to 0.5 seconds. Time::HiRes will notice this eventually and recalibrate. Note that since Time::HiRes 1.77 the clock_gettime(CLOCK_MONOTONIC) -might help in this (in case your system supports it). +might help in this (in case your system supports CLOCK_MONOTONIC). =head1 SEE ALSO |