From memory-based decisions to decision-based movements: A model of interval discrimination followed by action selection