John P. Linderman [Fri, 31 Aug 2001 08:20:35 +0000 (04:20 -0400)]
Message-Id: <
200108311220.IAA54125@raptor.research.att.com>
Fixes test 14 which could fail randomly in rare cases.
p4raw-id: //depot/perl@11797
if (!$have_time) {
skip 14
} else {
- my $t = time();
- my $tf = Time::HiRes::time();
- ok 14, (abs($tf - $t) <= 1),
- "time $t differs from Time::HiRes::time $tf";
+ my ($t1, $tf, $t2);
+ for my $i (1 .. 9) {
+ $t1 = time();
+ $tf = Time::HiRes::time();
+ $t2 = 1 + time();
+ last if (($t2 - $t1) <= 1);
+ }
+ ok 14, (($t1 <= $tf) && ($tf <= $t2)),
+ "Time::HiRes::time $tf not bracketed by $t1 - $t2";
+
}
unless (defined &Time::HiRes::gettimeofday
SAVEVPTR(PL_reg_re); /* from regexec.c */
SAVEPPTR(PL_reg_ganch); /* from regexec.c */
SAVESPTR(PL_reg_sv); /* from regexec.c */
- SAVEI32(PL_reg_sv_utf8); /* from regexec.c */
+ SAVESPTR(PL_reg_sv_utf8); /* from regexec.c */
SAVEVPTR(PL_reg_magic); /* from regexec.c */
SAVEI32(PL_reg_oldpos); /* from regexec.c */
SAVEVPTR(PL_reg_oldcurpm); /* from regexec.c */