Replace complex totalRepairTime logic with Math.max()