Tuning environmental timescales to evolve and maintain generalists