PIR sensor as Occupation detector

hey ..friends ..!!!
i m goin to make Occupation detector using 2 pir sensor ..!!
i tried a lot to make code on this but the delay of sensor cant make it work properly ..!!

Arrangement :
2 pir sensors are kept at distance and if somebody passed near to sensor then sensor will detect alternatively ..!!
if first sensed by 1st pir and then 2nd then person is IN.or vice versa OUT.

soppp ,I want some idea to make it proper.

PIR sensors are the wrong kind of sensors for this project.

What would happen in someone wandered near the first sensor, and then wandered away, without ever going near the second sensor?

How would you keep the relatively large range of sensor one from extending past that of sensor two?

What if someone is entering while someone else is leaving?

i tried a lot to make code on this but the delay of sensor cant make it work properly ..!!

But, you showed none of it. If the delay is consistent (that is, there is a 3 second delay after a person is detected by either sensor before the Arduino becomes aware of it), the delay doesn't matter.

If the delay from one sensor is not the same as the delay from the other sensor (but both are consistent), the delays can be negated (i.e. you can determine the time that each sensor actually fired) and the actual order still can be determined.

If the delays are not consistent, start again at the top.

And, when the 'occupant' goes to sleep or sits very quietly reading it drops out.

My wife designed 3 libraries in Saudi Arabia and the cool 'occupied' lighting controls dictated by the facilities guys had to be defeated for the libraries because the lights kept going off!

A type of IR temperature sensor is supposed to work for this, and only drop out if you become room temperature (and probably dead..)