Measuring the time required to pass two points

For my project i need to measure time required for a ball(small ball made of metal) to pass two points in a water cylinder. Please see the image below.

http://i.imgur.com/3ddyPSR.png

Is it possible to use IR sensor in those points (A & B point) to determine when the ball passes those points and calculate the time (in seconds). As the cylinder is made of plastic and there is water present will it be a problem for the sensor ? or there is any other way to do so.

Thanks in advance.

In theory your thinking is right. But in practice the light of the IR transmitter may be bend around in an un-focused way due to the tube and liquid and generate a blurry response on the IR detector (not a sharp rise or cut-off). Finding the exact time of passage may be tricky if the response is flat.

That said, I do not know how well IR is transmitted through water and the plastic of the tube. Probably not a problem with these kind of dimensions though. Just a matter of rushing more current through the IR led.

if the ball can be made magnetic, two reed switches at A and B would do the job.

There are zillions of sizes and shapes and packages for such reed switches.

stevech:
if the ball can be made magnetic, two reed switches at A and B would do the job.

There are zillions of sizes and shapes and packages for such reed switches.

Thank you. i will try that out