| 301 | } |
| 302 | |
| 303 | Duration DurationSegment::endLate() const |
| 304 | { |
| 305 | auto const tripDuration = duration() - cumDuration_; |
| 306 | auto const tripTimeWarp = timeWarp() - cumTimeWarp_; |
| 307 | auto const netDuration = tripDuration - tripTimeWarp; |
| 308 | return netDuration > std::numeric_limits<Duration>::max() - startLate() |
| 309 | ? std::numeric_limits<Duration>::max() |
| 310 | : startLate() + netDuration; |
| 311 | } |
| 312 | |
| 313 | DurationSegment::DurationSegment(Duration duration, |
| 314 | Duration timeWarp, |