Yep, sonar. The speed of sound in water is about 1640 yards per second, which is why 1600 is opposite 2 seconds - the time for the sound to get there and back.

These are often known as ASDIC...