Time system

Hi everyone. I need to know if there is any way to make a time system that is consistent with the real time system. I mean that time passes the same as in real life even if the game is not open. I do not know if you understand me
getTime()

That gives you time in milliseconds since a certain real life date, so you can use it to track passage of real time.

EDIT:

So you can use a variable script like this: new Date().getTime()

Put that in a variable when the game starts. Then at any time you can run the same script in another variable and subtract the first variable from it, and that gives you in milliseconds how much real time has passed.

Original thread: https://forums.rpgmakerweb.com/threads/time-system.149794/