The compare method returns -1 if the first duration is shorter, 0 if it is the same, and 1 if it is longer.