I think he used the water in the bottle to track the time of when will sungho come back after coming out (to see how long will it take if he went outside?). The two cells in the bottle represent the time of sungho's arrival. So, whenever the water is about to reach the top of the 2nd cell, it is a sign that sungho is about to arrive. Then he can hide the diary quickly. 
That's just what i think.                                            
As others said, I think it's just a timer. So I'm not sure why he's so scared of Sungho finding out, it has nothing to do with any escape plan and he didn't need to unhook the chain to do it. But on the other hand, Sungho is pretty crazy and would probably go off on him if he found out. He seems to expect Dohyun to just sit there all day and wait for him without moving.

		
I like this manhwa but didn't quite understand all...
First, what's up with the water bottle ? Did he put medication in it or something ? I may be really dumb, but I don't understand why he's so affraid the other creepy guy would find out...
*Spoilers*
And if I got it well, the creepy guy had a hard time with the victim back when they were in highschool, so now he's taking revenge by doing the same thing the victim has done to him ?