ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/09_timer.t
(Generate patch)

Comparing Coro/t/09_timer.t (file contents):
Revision 1.2 by root, Tue Nov 27 02:51:04 2001 UTC vs.
Revision 1.3 by root, Mon Feb 18 21:25:02 2002 UTC

13 print "ok 2\n"; 13 print "ok 2\n";
14}; 14};
15new Coro::Timer at => time + 1, cb => sub { 15new Coro::Timer at => time + 1, cb => sub {
16 print "ok 4\n"; 16 print "ok 4\n";
17}; 17};
18new Coro::Timer after => 2, cb => sub { 18new Coro::Timer after => 3, cb => sub {
19 $signal->send; 19 $signal->send;
20}; 20};
21new Coro::Timer after => 0, cb => sub { 21new Coro::Timer after => 0, cb => sub {
22 print "ok 3\n"; 22 print "ok 3\n";
23}; 23};
24(new Coro::Timer after => 0, cb => sub { 24(new Coro::Timer after => 0, cb => sub {
25 print "not ok 4\n"; 25 print "not ok 4\n";
26})->cancel; 26})->cancel;
27new Coro::Timer at => time + 3, cb => sub { 27new Coro::Timer at => time + 5, cb => sub {
28 print "ok 7\n"; 28 print "ok 7\n";
29 $Coro::main->ready; 29 $Coro::main->ready;
30}; 30};
31 31
32print $signal->timed_wait(1) ? "not ok" : "ok", " 5\n"; 32print $signal->timed_wait(2) ? "not ok" : "ok", " 5\n";
33print $signal->timed_wait(1) ? "ok" : "not ok", " 6\n"; 33print $signal->timed_wait(2) ? "ok" : "not ok", " 6\n";
34schedule; 34schedule;
35print "ok 8\n"; 35print "ok 8\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines