motor control depending of time