Timer help

I am trying to figure out how to sample multiple times on my inputs. The scenario is:
16 inputs of 5volt pulses. Of these sixteen a pair makes up on timing event, in other words I get a pulse when sensor 0 gets blocked and a pulse on sensor 1 when it gets blocked. The timing between these two pulses is my speed. The speed between pulses will be greater than 50ms. 16 inputs divided by two wires for each means I need a total of 8 timers. Any of the inputs could trip at any time.
To help explain this, my application is to measure the speeds of all 8 lanes on a highway. I have two sensors for each lane that will be spaced a few feet apart.

My question is how do I capture each event and not miss any? If I start a timer, doesn’t that hold up the processor.

Code thinking:
function myTimer()
Start timer
When second input sensed stop timer.
Subtract timer values to get total time.
end

Any help would be appreciated.
Thank you,