How to calculate the rate of change of an encoder connected to a high speed counter.