add timeout function

to prevent from mis touching on proximity sensor.