ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/Coro/t/09_timer.t
Revision: 1.5
Committed: Mon Jan 8 01:21:23 2007 UTC (19 years, 9 months ago) by root
Content type: application/x-troff
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
State: FILE REMOVED
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