(less) Simple (still) working code 

#! /usr/bin/perl

use strict;
use warnings;

use Event;

Event->timer(
    interval => 2,
    repeat => 1,
    cb => sub { print(time()."\n") },
);

Event->timer(
    after => 5,
    cb => sub { print("Finished\n"); exit 0; },
);

Event::loop();
1191466383
1191466385
Finished