--- EV/t/01_timer.t 2007/11/17 01:52:50 1.5 +++ EV/t/01_timer.t 2007/11/22 04:52:24 1.6 @@ -5,6 +5,8 @@ use EV; +my $fudge = 0.02; # allow rt and monotonic clock to disagree by this much + my $id = 1; my @timer; my @periodic; @@ -17,8 +19,8 @@ push @timer, EV::timer $t, 0, sub { my $now = EV::now; - print $now >= $prev ? "" : "not ", "ok ", ++$id, " # t0 $i $now >= $prev\n"; - print $now >= $base + $t ? "" : "not ", "ok ", ++$id, " # t1 $i $now >= $base + $t\n"; + print $now + $fudge >= $prev ? "" : "not ", "ok ", ++$id, " # t0 $i $now + $fudge >= $prev\n"; + print $now + $fudge >= $base + $t ? "" : "not ", "ok ", ++$id, " # t1 $i $now + $fudge >= $base + $t\n"; unless ($id % 3) { $t *= 0.0625;