Minimal time would be spent in courtrooms if the divorce is amicable.
The problem is, when there's hurt feelings involved, it will get messy. And surely they still need to go to court to divide any property/possessions together, and determine custody of children if there's any involved. I doubt it will solve anything in reality, maybe even cause more hurt as instead of going through the grieving process that is related to ending of a relationship, one half of the marriage could just get up and leave at the end of 2 years saying "oh bye, our contract has ended and I don't need to give you a reason why I'm leaving".
After all, work contracts tend to be permanent (until either party wants to dissolve them) because it creates security. I know there's sometimes seasonal cover or maternity leave cover but as those people are not sure they can stay afterwards, they're likely to search another job when the contract is running out, logic would say this would happen with relationships, too.
It'd all be ok without the basic thing that when one marries, they usually share their whole life with the other person and when marriage ends, their life is torn apart.