Revision: | 1.1 |
Committed: | Sun Nov 25 20:04:06 2001 UTC (22 years, 6 months ago) by root |
Content type: | application/x-troff |
Branch: | MAIN |
Log Message: | *** empty log message *** |
# | Content |
---|---|
1 | $|=1; |
2 | print "1..6\n"; |
3 | |
4 | use Coro; |
5 | use Coro::Timer; |
6 | |
7 | print "ok 1\n"; |
8 | |
9 | new Coro::Timer after => 0, cb => sub { |
10 | print "ok 2\n"; |
11 | }; |
12 | new Coro::Timer after => 1, cb => sub { |
13 | print "ok 4\n"; |
14 | }; |
15 | new Coro::Timer after => 0, cb => sub { |
16 | print "ok 3\n"; |
17 | }; |
18 | (new Coro::Timer after => 0, cb => sub { |
19 | print "not ok 4\n"; |
20 | })->cancel; |
21 | new Coro::Timer at => time + 2, cb => sub { |
22 | print "ok 5\n"; |
23 | $Coro::main->ready; |
24 | }; |
25 | |
26 | schedule; |
27 | print "ok 6\n"; |