in reply to Re: Reminder for KDE Kid
in thread Reminder for KDE Kid

Why sleep 1 second at all? No use hogging up the CPU looping every second when you can simply sleep until the next event.
my $last = 0; for my $duration (sort {$a <=> $b} keys %actions) { sleep($duration - $last); $last += $duration; $actions{$duration}->(); }