Minor refactoring of segment delay.
Segment delay calculation.