Measuring PWM Pulse length

Hey,

I have a sensor, that has a PWM signal as output. To get the values, I have to measure the pulse length. The longer a pulse is, the higher the value is.
Whats the best way to measure the pulse? Is it possible by just using a interrupt-capable GPIO? Or are there better ways that do the trick?

take a look at the gadgeteer source code for the IR Receiver Module. It could be adapted to measure the duration of a pulse. http://gadgeteer.codeplex.com/SourceControl/latest#Main/Modules/GHIElectronics/IR Receiver/Software/IR Receiver/IR Receiver_42/IR_Reciever_42.cs

@ dominik38 - if you have a premium board you could use the SignalCapture class too

I’m planning to build a module, so it would be great to be compatible to every mainboard.

@ Jeff:
Just viewed the IR Receiver driver - Am I right that I can use every Sockettype? Because I need Pin 3 - the GPIO! ?