Arduino alternate PWM input method

I'm working on a rudimentary flight stabilization system for an airplane, which reads in 4 PWM inputs from an R/C receiver. The problem is, the pulseIn command is taking far too long to execute, so I need an alternative method of reading the four inputs. With all the code running except the PWM, my entire cycle takes ~ 45ms, however adding the four pulseIn(pin, HIGH) calls leads to ~250ms cycle times, which isn't working out for me. Is there an alternative, perhaps an interrupt-driven, way to read the duty cycle time of the PWM lines?

• I guess the recipe would be along these lines: Free running timer which current value you can read at any given time. Four input pins that trigger an interrupt at both edges. Then the interrupt routine can read the timer at every edge and with a bit of memory you can calculate pulse ratio. You'll have to program the hardware much more directly than when using the Arduino libraries though, so you better start by finding the related datasheet. – jippie Feb 5 '13 at 7:42