Detecting direction of movement

So I asked something like this before. But I need a way to detect when a person goes into the room and out. I need one sensor that can do that. Basicly I just need a way to know if someone went from left to right or from right to left (in an 5cm area). I am trying to do something like this with IR sensors (two IR emmitters and two sensors) but the arduino is a little too slow to handle that fast movements - I am just measuring the time difference between the sensors.

So can I can get something that sends a digital pulse for one direction and different pulse for other direction?

I think this should be possible to make with the emitters/sensors you have and a few logic gates an maybe some capacitors?

Really just guessing though.

post your code roli. I welcome correction, but the arduino should be capable of performing such a task, as it clocks in at a whopping 16mhz. This could simply be an issue where you are not polling the sensors frequently.

Are you using interrupts?

All about my sensor problems in this thread:
The current problem at the second page.