Support generic function callbacks for event
Add event::duration() method