add programable time for switching