The following code will guess the current fraction of a tick. This is only useful for low resolution encoders. The guess is only accurate if the current speed is fairly constant. The logic is: if the previous tick tool 100μS and happend 10μS ago then we are about 10% into the next tick.