I just bought an Arduino Zero and realized that the pulsein() function isn't what I needed to read in PWM outputs from an encoder that I have.
The encoder outputs a continuous PWM output at 1kHz so using looping the pulsein() function to read the PWM values would hog up the processor all the time.
I am moving from a Pololu Orangutan MCU to the Arduino platform and Pololu wrote a very nice library for reading PWMs based on pin change interrupts: https://www.pololu.com/docs/0J18/8
Is there a library similar in the Arduino world? I haven't found anything yet and don't want to reinvent the wheel if such a library already existed.