ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/t/06_loop_once.t
(Generate patch)

Comparing EV/t/06_loop_once.t (file contents):
Revision 1.1 by root, Fri Dec 21 05:30:25 2007 UTC vs.
Revision 1.3 by root, Fri Nov 21 02:23:15 2008 UTC

1BEGIN {
2 if (exists $ENV{AUTOMATED_TESTING}) {
3 print "1..0 # Skipped: Too many broken cpan tester setups.\n";
4 exit;
5 }
6}
1BEGIN { $| = 1; print "1..6\n"; } 7BEGIN { $| = 1; print "1..6\n"; }
2 8
3no warnings; 9no warnings;
4use strict; 10use strict;
5use Socket; 11use Socket;
7use EV; 13use EV;
8 14
9my $l = new EV::Loop; 15my $l = new EV::Loop;
10 16
11for my $i (3..5) { 17for my $i (3..5) {
12 $l->once (undef, 0, $i * 0.2, sub { 18 $l->once (undef, 0, ($i - 3) * 0.5 + 1.0, sub {
13 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n"; 19 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n";
14 }); 20 });
15} 21}
16 22
17socketpair my $s1, my $s2, AF_UNIX, SOCK_STREAM, PF_UNSPEC; 23socketpair my $s1, my $s2, AF_UNIX, SOCK_STREAM, PF_UNSPEC;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines