better rateinterval sorting

This commit is contained in:
Radu Ioan Fericean
2015-08-03 11:50:56 +03:00
parent 679b89d49b
commit 39a51dc826

View File

@@ -376,7 +376,8 @@ func (il RateIntervalList) Swap(i, j int) {
// we need higher weights earlyer in the list
func (il RateIntervalList) Less(j, i int) bool {
return il[i].Weight < il[j].Weight
return il[i].Weight < il[j].Weight ||
il[i].Timing.StartTime > il[j].Timing.StartTime
}
func (il RateIntervalList) Sort() {