From: Steve Peters Date: Sat, 17 Dec 2005 19:21:35 +0000 (+0000) Subject: Upgrade to Time-HiRes-1.86 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ff7df920e39ddd3df5ebcc5a06e803af9c883004;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Time-HiRes-1.86 p4raw-id: //depot/perl@26394 --- diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes index 1c78b96..fe9dc3e 100644 --- a/ext/Time/HiRes/Changes +++ b/ext/Time/HiRes/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension Time::HiRes. +1.86 [2005-12-17] + - HiRes.t:s/ok 32/ok 33/, from Dominic Dunlop + - tighten up the clock() test marginally by requiring non-negative + - clock_nanosleep() and clock() doc tweaks + 1.85 [2005-12-16] - the interface to clock_nanosleep() is more natural when it is like (hires) time() (instead of like nanosleep), diff --git a/ext/Time/HiRes/HiRes.pm b/ext/Time/HiRes/HiRes.pm index d8a1832..964e438 100644 --- a/ext/Time/HiRes/HiRes.pm +++ b/ext/Time/HiRes/HiRes.pm @@ -21,7 +21,7 @@ require DynaLoader; d_nanosleep d_clock_gettime d_clock_getres d_clock d_clock_nanosleep); -$VERSION = '1.85'; +$VERSION = '1.86'; $XS_VERSION = $VERSION; $VERSION = eval $VERSION; @@ -114,7 +114,8 @@ Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers $realtime = clock_gettime(CLOCK_REALTIME); $resolution = clock_getres(CLOCK_REALTIME); - clock_nanosleep(CLOCK_REALTIME, 1.5, TIMER_ABSTIME); + clock_nanosleep(CLOCK_REALTIME, 1.5); + clock_nanosleep(CLOCK_REALTIME, time() + 10, TIMER_ABSTIME); my $ticktock = clock(); @@ -353,8 +354,8 @@ The time returned also includes the process times of the terminated child processes for which wait() has been executed. This value is somewhat like the second value returned by the times() of core Perl, but not necessarily identical. Note that due to backward -compatibility limitations the returned may wrap around at about 2147 -seconds or at about 36 minutes. +compatibility limitations the returned value may wrap around at about +2147 seconds or at about 36 minutes. =back diff --git a/ext/Time/HiRes/t/HiRes.t b/ext/Time/HiRes/t/HiRes.t index f8f00d0..0fed572 100644 --- a/ext/Time/HiRes/t/HiRes.t +++ b/ext/Time/HiRes/t/HiRes.t @@ -574,7 +574,8 @@ if ($have_clock) { push @clock, clock(); print "# clock = @clock\n"; } - if ($clock[1] > $clock[0] && + if ($clock[0] >= 0 && + $clock[1] > $clock[0] && $clock[2] > $clock[1] && $clock[3] > $clock[2]) { print "ok 33\n";