How to modify the below code that the motor works (Turns on) for tamount of time

Sorry, but I know nothing about programming for Android