Senph::Async
sub run { my $self = shift; ... $log->infof( "Starting up on http://localhost:%i", $port ); my $timer = IO::Async::Timer::Periodic->new( interval => 3, first_interval => 1, on_tick => sub { $self->mail_queue->send; } ); $timer->start; $self->loop->add($timer); $self->loop->run; }