merged length and time based sorting algorithm under same interface - TimeWindow
made length and time based sorting configurable