I want to measure speed with one infra gate. The width of the bypassing object is known therefore I could calculate the speed. However the infrared gate would be interrupted only for 3-10ms. I understand raspi is not real time but it doesn't matter for me as far as I can get the exact time between low-high and high-low.
My pigpio library will let you reliably time gpio transitions to within a few microseconds.
The library itself is written in C but you can use any language you want to capture the data (the events are time-stamped at source).