I\'m new to JavaScript and I\'m trying to write a code which calculates the time elapsed from the time a user logged in to the current time.
Here is my code:-
You can simply use performance.now()
Example:
start = performance.now(); elapsedTime = performance.now() - start;