There is the function "micros()".
You can use a Pin Change interrupt to record the time (in microseconds) on the rising edge and, at the falling edge, subtract the start time from that.
See: attachInterrupt() in the built-in Reference.
There is the function "micros()".
You can use a Pin Change interrupt to record the time (in microseconds) on the rising edge and, at the falling edge, subtract the start time from that.
See: attachInterrupt() in the built-in Reference.