ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/Timer.pm
(Generate patch)

Comparing Coro/Coro/Timer.pm (file contents):
Revision 1.13 by root, Tue May 27 01:15:31 2003 UTC vs.
Revision 1.14 by pcg, Sun Sep 28 09:00:49 2003 UTC

39@EXPORT_OK = qw(timeout sleep); 39@EXPORT_OK = qw(timeout sleep);
40 40
41=item $flag = timeout $seconds; 41=item $flag = timeout $seconds;
42 42
43This function will wake up the current coroutine after $seconds 43This function will wake up the current coroutine after $seconds
44seconds and sets $flag to true (it is false intiially). If $flag goes 44seconds and sets $flag to true (it is false initially). If $flag goes
45out of scope earlier nothing happens. This is used to implement the 45out of scope earlier nothing happens. This is used to implement the
46C<timed_down>, C<timed_wait> etc. primitives. It is used like this: 46C<timed_down>, C<timed_wait> etc. primitives. It is used like this:
47 47
48 sub timed_wait { 48 sub timed_wait {
49 my $timeout = Coro::Timer::timeout 60; 49 my $timeout = Coro::Timer::timeout 60;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines