Added event ttl option (issue #1787)