Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Run code every 6seconde

by CardinalNumber (Prior)
on Dec 05, 2011 at 20:32 UTC ( #941915=note: print w/ replies, xml ) Need Help??


in reply to Re: Run code every 6seconde
in thread Run code every 6seconde

Whew! This is a great example of why I never used POE. Fortunately, Reflex hides most of… that:

use 5.010; use Reflex::Interval; my %events; $events{func1} = Reflex::Interval->new(interval => 1, on_tick => sub { say 'I am function 1!' } ); $events{func2} = Reflex::Interval->new(interval => 1, on_tick => sub { say 'I am function 2!' } ); Reflex->run_all;
Edit: ++ for the AnyEvent example above too.


Comment on Re^2: Run code every 6seconde
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://941915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (13)
As of 2015-07-03 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (53 votes), past polls