update pulseIn: timeout is us, need convert ms.