DRY
If you're sorting your durations to calculate the median, why bother calculating the minimum and maximum on a rolling basis as you collect them, rather than just accessing the first and last value once they're sorted?
Doing it the laterlatter way reduces repeated effort.