Calculating the elapsed time after the game is opened

I was looking around the forums about this certain thing, in some engines, it is known as elapsed time, before I stopped using construct (due to some limitations and not finding much tutorials), there was a plug-in that you can download called time away.

However, I can’t seem to find anything like this in Gdevelop, where it calculates the how long since the game was closed, then subtract it from the working/saved timer (like reward timers, waiting for something to finish, etc…).

One of the forums talked about it as I said but didn’t seem to have much explanation in it. Please, if you have a code example or recreation of the code, provide an image for it.

Thank you!

You can set a global variable like g_game_started = TimeStamp then store in LocalStorage when the game closed/reopen just get Storage value of the g_game_started and compare to the current TimeStamp.

Will try doing that, thanks

So, update, I couldn’t seem to get it to work, I am very confused, can anyone please provide screenshots or how the code should be?