I believe the Romans had a horse-drawn gearwheel affair that would drop a small stone at each measured mile. Then a milestone would be installed. The cart was also equipped with a differential. Not bad for 2,000+ years ago.
All we've done is improve the resolution a bit.