in reply to Re: infinite loops == bad?
in thread infinite loops == bad?

$ perl -le '$now=57; $then=12; print +($then-$now)%60' 15

-Blake

Replies are listed 'Best First'.
Re: Re: Re: infinite loops == bad?
by Biker (Priest) on Apr 24, 2002 at 15:55 UTC

    Agreed, blakem.

    What I like using that module is that I can:

    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(); } }
    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.
    Everything went worng, just as foreseen.