Programmable time controller