Expire time

Hello People…

I think I need some help here, I’ve been having some hard time creating a function to check some expire time.

I got this application I’m working on, and it uses a cURL webpage login, and sets a cookie, this cookie is alive
for 20 min, from when a user do a login, my plan is to store the time for when the login is done in database…

And here is my problem, I need something to check if the time from the login until “now” is more than 20 min
I could allways use an on idle handler, but the application might be closed before the time expires, if so the user
is still loggedin and can use the program without doing another login. I need this to show some status and maby
do a auto relogin… I suck at math so any help here would be super great.


Okay, this is what I need.

Funny as something so simple can be so hard :slight_smile:

set nextLogin to (current date) + 19 * minutes