In most drivers ed programs, they teach 4 second following distance. You pick a landmark, start counting when the car in front of you passes it, and you should count to at least 4 by the time your vehicle passes the same spot.
Unfortunately I don't think it's actually a law in many places.