That depends which connection you are travelling with, the fastest route is the one from Istria to Venice, which takes about 3 hours. The longest routes are the car ferries travelling overnight, they have a travel time of about 10 hours.