How to use real time to set a timer?
I made a Energy System which player will consume one point energy when he/she enter any levels.
And every 30 minutes, the Energy System will restore 1 point energy.
I have no idea how to set timer by real time.
For excample: The player consumed one point energy in 5:25A.M. And he/she can restore 1 point energy in 5:55A.M.(Whether he/she open my game or not, he/she will restore one point energy every 30 minutes.)
Could someone teach me how to set real timer, please?