in reply to Re: Re: infinite loops == bad?
in thread infinite loops == bad?
Agreed, blakem.
What I like using that module is that I can:
which gives a very clean main logic. I'm sure that it can be built in many ways (TMTOWTDI) but I really like this module. It's hiding the implementation details in a clean way.my $th=Schedule::ByClock->new(12,33,55); # Some already defined values while(1) { $th->get_control_on_second(); work_hard(); if(condition()) { $th->get_control_on_second(42); # Special case. additional_work(); } }
|
|---|