pulseIn(), photogate, time measurement

I'd read some on http://arduino.cc/forum/index.php/topic,74813.0.html, and here: Google Code Archive - Long-term storage for Google Code Project Hosting., but I don't know were find pulseIn to repairit. the code shared by Nick Gammon in the first url presents a half solution but have some crazy problems too.