The SpeedClock app measures both distance and speed to an object, and runs $1. There are many possibilities with this app, from measuring a car’s speed, to the velocity stride of your puppy.
It has a three axis gyroscope that, together with some trigonometry, gets the distance measurement. Speed is a simpler affair, doing some motion match with the video cameas of the iPhone 3Gs, iphone 4, and iPod touch 4. Of the 3 devices, the 3Gs has no gyroscope, so it’ll be less accurate.