ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Coro/t/09_timer.t
Revision: 1.4
Committed: Fri Nov 24 15:34:33 2006 UTC (19 years, 11 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: rel-3_3, rel-3_2, rel-3_1, rel-3_0, stack_sharing, rel-3_01, rel-3_11
Changes since 1.3: +11 -25 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 $|=1;
2 print "1..4\n";
3
4 use Coro;
5 use Coro::Signal;
6 use Coro::Timer;
7
8 print "ok 1\n";
9
10 my $signal = new Coro::Signal;
11
12 my $timeout = Coro::Timer::timeout 3;
13
14 print $signal->timed_wait(1) ? "not ok" : "ok", " 2\n";
15
16 print $timeout ? "not ok" : "ok", " 3\n";
17
18 Coro::Timer::sleep 2;
19
20 print $timeout ? "ok" : "not ok", " 4\n";
21