summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/Time/HiRes/Changes5
-rw-r--r--ext/Time/HiRes/HiRes.pm9
-rw-r--r--ext/Time/HiRes/t/HiRes.t3
3 files changed, 12 insertions, 5 deletions
diff --git a/ext/Time/HiRes/Changes b/ext/Time/HiRes/Changes
index 1c78b96e1d..fe9dc3e36f 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 d8a1832e9e..964e4385df 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 f8f00d0b06..0fed57273a 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";