I have an authenticate function. The user is automatically logged out after 30 minutes. I'd like to store the time of login (timestamp?) in the authenticate function. I will then update that time each time a function requiring authentication is called. If 30 minutes have passed since the last call, it will automatically reauthenticate. I'll store the last access timestamp or date in a global variable. I'm looking code examples showing a good way to:
1) Store the date or timestamp in authenticate or last function call in the global variable 2) Compare the current time with last call to see if 30 minutes have passed.
Thanks