as I want to read in Speed of Light
Please explain what you mean by this.
What does the device data sheet tell you about the Output Data Rate and measurement timing?
Always post ALL the code, otherwise it is impossible to know how you have set up the sensor.