want to measure pulse width on MSP430 GPIO

i am calculating the distance by using ultrasonic sensor. echo pulse received on GPIO P1.2 of MSP430G2553. i want to calculate this pulse width for the distance calculation.i am getting echo i dont tknow how to calculate the width please kindly help me . thanks