backported add_timer and add_rb_timer for perl/psgi plugin