Absolute shipment traveltime

Hello there, I’m trying to get famillair with the the idea of pickup & deliveries related to time windows. I know It’s possible to set a timewindow for both. But is it possible to set an absolute max traveltime for a shipment. for example
pickup 9:11
delivery 10:12
maxTravelTime 2
I this case the maximum time between the pickup endtime and the delivery arrivaltime would be 2.
Maybe it’s possible using an hardconstrain, but I guess that would be a costly function ?