Skip to content

Instantly share code, notes, and snippets.

@bduggan
Created September 26, 2012 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bduggan/3789274 to your computer and use it in GitHub Desktop.
Save bduggan/3789274 to your computer and use it in GitHub Desktop.
sleep
#!/usr/bin/env perl
use Mojo::IOLoop;
use feature 'say';
Mojo::IOLoop->timer(5 => sub {
say "It has been 5 seconds, it is now ".localtime;
} );
say "It is now ".localtime;
Mojo::IOLoop->start;
#!/usr/bin/env perl
use feature 'say';
say "The time is ".localtime;
sleep 5;
say "It has been 5 seconds, the time is ".localtime;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment