diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-03-10 19:55:44 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-03-10 19:55:44 +0000 |
commit | 8cc5160aefb2ba3611d1d5d6b12b996227f9da72 (patch) | |
tree | 256923c9d568f659ca72d254993e6a40c439a7b5 /examples/io-async.pl | |
download | Future-tarball-master.tar.gz |
Future-0.32HEADFuture-0.32master
Diffstat (limited to 'examples/io-async.pl')
-rw-r--r-- | examples/io-async.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/io-async.pl b/examples/io-async.pl new file mode 100644 index 0000000..7763db1 --- /dev/null +++ b/examples/io-async.pl @@ -0,0 +1,9 @@ +use IO::Async::Loop 0.56; # Already has Future support built-in ;) + +my $loop = IO::Async::Loop->new; + +my $timer = $loop->delay_future( after => 3 ); +print "Awaiting 3 seconds...\n"; + +$timer->get; +print "Done\n"; |