Interrupt sure is one way. Maybe PulsIn is another, to read the edge of the pulse.

Ioannis