Reduce Time
For hardware based method, you can use an independent timer to trigger off the counter to measure the number of speed pulses in a suitable frequency, such as 1MHz. In that case, the time interval you obtained is so small that it apporaches to zero.