Need help with controlling all components in build using ultrasonic sensor please help asap

Isn't how far the object is what you wanted to know so you can begin the timing?
Paul