I2C communication

I do not know much about I2C communication but I have a code which reads data from RTC. In case the rtc did not send the data will I stay in infinite loop? I am sorry I do not have access to source code. I wanted to know how I2C driver is written in general if there is no response from slave.
 
No one can know how our code works.
I think there should be a time out.
You can unplug the RTC and see if the code times out. (error)
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…