@EJLED capturing 5 microseconds with your arduino is going to be really tough to get it to work if you don't code very close to the hardware
the micros() function has a resolution of four microseconds (i.e. the value returned is always a multiple of four - so your accuracy is not enough for what you want to achieve
Your arduino runs at 16MHz only so in 5 microseconds you can only execute 80 clock ticks.
I would wire an IRQ to detect the rising edge and in the ISR I see two options:
1/ Use a hardware timer --> Timer1 is a 16bit timer and with a Prescale of 1 you can achieve a 0.0625 uS accuracy for a max duration of 8.192 mS. You could have a look at TimerOne::start and stop in the Timer1 library (TimerOne.cpp) to get an idea on how to use the timer.
2/ You have enough cycle to manually code in assembly language
- push the used registers and save CPU flags to stack beforehand - ~10 cycles
- increments a 16 bit counter (using registers r24 and r25) - ~10 cycles
- check your pin for falling edge and loop - ~10 cycles (read the port, mask for right bit, compare and loop if still HIGH)
As you know exactly the number of loop you executed with the counter and the time it takes for one loop to execute then you can deduct the exact number of microseconds and store that into a global variable
You fully control timing and what's going on but accuracy is probably not as good as with the timer1 though