Add switch to reverse order of tasks_by_time, with test