Interrupt for measuring time

Maybe you can use pulseIn(pin, state);

byte pin = 2; //or whatever pin you're using
unsigned long high2low = pulseIn(pin, HIGH); //microseconds from when pin 2 turns HIGH to when it turns LOW
unsigned long low2high = pulseIn(pin, LOW); //microseconds from when pin 2 turns LOW to when it turns HIGH

Caution: pulseIn delays you're code, and will time out in 1 second if no signal is received. You can adjust the timeout by doing: pulseIn(pin, state, timeout); timeout is in microseconds.