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(); } }