I would tend to blanket answer the question with "As long as it takes," but in the hand of a skilled workman.
Jesus preached on the parable of the prodigal son. How long was that? Maybe a few minutes.
Paul preached so long Eutychus fell asleep and then out of the window. (Acts 20:9-12). How long was that? Maybe a few hours. Who wouldn't want to hear either Paul or Jesus preach?