For our robot project we have been using the popular quad encoder object released in 2005 by Jeff Martin a lot of times. Works well and has lots of flexibility and the best achievable performance on the Prop1. For more complex applications, C and C++ are better than spin and the code runs faster.
So we ported with some help the quad encoder from spin to C.
We added as well a life counter and a time measurement.