You can read new values from the Sharp IR sensor every 39ms. If you read them faster, you read the same value multiple times until the sensor updates it. So, you have to wait 39ms between sensor reads. If this gets too slow, use 2 or 3 sensors mounted at 90 (or 45) degrees to each other and do a 90 degrees sweep.