Skip to content

Commit

Permalink
fixed step example
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 17, 2012
1 parent 6212486 commit 4254c06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop.pm
Expand Up @@ -465,15 +465,15 @@ ones as a chain of steps.
# First step (simple timer)
sub {
my $delay = shift;
Mojo::IOLoop->timer(2 => $delay->next);
Mojo::IOLoop->timer(2 => $delay->begin);
say 'Second step in 2 seconds.';
},
# Second step (parallel timers)
sub {
my $delay = shift;
Mojo::IOLoop->timer(1 => $delay->next);
Mojo::IOLoop->timer(3 => $delay->next);
Mojo::IOLoop->timer(1 => $delay->begin);
Mojo::IOLoop->timer(3 => $delay->begin);
say 'Third step in 3 seconds.';
},
Expand Down
6 changes: 3 additions & 3 deletions lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -78,15 +78,15 @@ Mojo::IOLoop::Delay - Control the flow of events
# First step (simple timer)
sub {
my $delay = shift;
Mojo::IOLoop->timer(2 => $delay->next);
Mojo::IOLoop->timer(2 => $delay->begin);
say 'Second step in 2 seconds.';
},
# Second step (parallel timers)
sub {
my ($delay, @args) = @_;
Mojo::IOLoop->timer(1 => $delay->next);
Mojo::IOLoop->timer(3 => $delay->next);
Mojo::IOLoop->timer(1 => $delay->begin);
Mojo::IOLoop->timer(3 => $delay->begin);
say 'Third step in 3 seconds.';
},
Expand Down

0 comments on commit 4254c06

Please sign in to comment.