How to make a timer linked with real time?

So I want to make a timer which use real time, here is what I mean :
on some mobile games, when you have to wait “x minutes” to get something in a game, you can cheat by changing the clock time of the device, and I want to avoid that kind of cheat.
Is there a way to do that ?

You would need to do this through http and validate a real world time, thats the only way you could get access to real world time if you do not want to use the device time. Either way though, to avoid cheating the client should never be making that decision. Only the server should be deciding if enough time has elapsed for the client to proceed, this way it does not mater if the client changes the device time.