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

Comparing EV/t/02_once.t (file contents):
Revision 1.5 by root, Wed Dec 5 13:59:57 2007 UTC vs.
Revision 1.6 by root, Sat Mar 22 23:55:22 2008 UTC

5use Socket; 5use Socket;
6 6
7use EV; 7use EV;
8 8
9for my $i (3..5) { 9for my $i (3..5) {
10 EV::once undef, 0, $i * 0.2, sub { 10 EV::once undef, 0, $i * 0.4, sub {
11 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n"; 11 print $_[0] == EV::TIMEOUT ? "" : "not ", "ok $i\n";
12 }; 12 };
13} 13}
14 14
15socketpair my $s1, my $s2, AF_UNIX, SOCK_STREAM, PF_UNSPEC; 15socketpair my $s1, my $s2, AF_UNIX, SOCK_STREAM, PF_UNSPEC;
16 16
17EV::once $s1, EV::WRITE, 0.5, sub { 17EV::once $s1, EV::WRITE, 0.8, sub {
18 print $_[0] & EV::WRITE ? "" : "not ", "ok 2\n"; 18 print $_[0] & EV::WRITE ? "" : "not ", "ok 2\n";
19}; 19};
20 20
21print "ok 1\n"; 21print "ok 1\n";
22EV::loop; 22EV::loop;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines