Want a timer like clash of clans for updating buildings

I am using Unity 3D with Some Php Services and MySql Database. I want a timer that keep running when the game is not running…just like in clash of clans when we update townhall(buildings) it says how many hours or days left to update this…and if we dont play the game but it updates the building in the specific time required…how to do this…please comment its urgent

Urgent, eh? :slight_smile:

Well, if you are content with keeping track of the time locally , just save the DateTime and reload it when you load the game.

dont wanna do it localy thats why i used mysql server
can you help me in that case plz

Well, I don’t know the specific answer for mysql, but if you mean it’s on a server, save the relevant time data there (when it will finish or when it started) – whatever you can use to work out how much percent is ‘done’ when you reload the game* :slight_smile:

thats the point how to do that ??
i am confused…i have done it locally but its not safe enough

Okay, sorry I didn’t realize you didn’t know how to store and retrieve from the database.
I don’t know, either :slight_smile:

I can say this to be clear (to modify your question). You don’t need a timer, so much as just the time value. =)

Maybe modify your question to ask which part you don’t know. In the thread, you say you’re using mysql and php services… Are those working - you are storing stuff remotely already or no?
That might get the attention of someone who has a better answer for you. :slight_smile:

Good luck.