Clash of Clans way (?)
Well, you could do what codah told you to, but that would be insecure, as values would be saved (I think) on your phone and that would make it easy for somebody with good knowledge of programming, to change those values at will, and thus cheat
What games like Clash of Clans do is keep up a server on another PC, that the device calls via the internet, to give it all the information about your houses and how much time they need to finish up building
It is certainly possible in C2 via maybe Websockets, but that's a long story ... You might want to check out the manual on multiplayer servers and such