ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/t/09_timer.t
Revision: 1.4
Committed: Fri Nov 24 15:34:33 2006 UTC (17 years, 7 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

# User Rev Content
1 root 1.1 $|=1;
2 root 1.4 print "1..4\n";
3 root 1.1
4     use Coro;
5 root 1.2 use Coro::Signal;
6 root 1.1 use Coro::Timer;
7    
8     print "ok 1\n";
9    
10 root 1.2 my $signal = new Coro::Signal;
11    
12 root 1.4 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