How to calculate timestamp when it was saved from last time to now

All im tryna do is lets say i have this timestamp right? it saved the current time and everything in seconds however im making it so when the player logs in back to the game the game save this new timestamp and compares it to the old save timestamp. For example im tryna implement this feature where once every 2 min the player comes back their quest is done or something like that

Have a look at this thread. You’ll just need to divide the difference between 2 timestamps by 108,000,000.
[correction]
If the difference between the two timestamps is more than 120,000, then 2 minutes have passed.

Hi MrMen!

Why 108 000 000!

Isn’it 86 400 000?
(1 day=24h x 60m x 60s x 1000ms)

A+
Xierra54

Ah, no, it’s neither. I made a mistake. 120,000 milliseconds is 2 minutes. It should be if the difference between 2 timestamps > 120000 then 2 minutes have passed.

I’ve corrected my previous answer.