The time of flight is a function of the height reached. The height reached is a function of the angle of launch. When the object is not launched vertically, some energy goes into horizontal acceleration, so does not contribute to vertical acceleration. The proportion of energy expended in the vertical direction is a function of launch angle.