Add OS_getAllEvents function