Adafruit I2C freeze fix?

My i2c screen freezes due to noise on the I2c pins or something. But i've stumbled upon this and i'm curious:

I'm looking on this page,19624.0.html

and the user posted two files used by the wire library. He said he used a timeout but i'm not sure where as i'm unfimilar with C code. Is it the line with 10000UL in twi.c ?

I'd like to know if a timeout of 50MS can be used? and where can we put this in the code and i use it in my library locally?

Thanks for reading this far.

Not sure what you mean by "screen freezes" but you can find a lot of chit chat on the web re. the Arduino Wire library blocking (stalling) the sketch.

I use Jeff Rowberg's I2Cdev library as this includes a time-out and helps bus lockups. Since using his library I have not had problems.

You can find his library here and lots of device interface examples to occupy a curious mind.

50ms should be OK for a timeout.