I have a set of users in my asp.net mvc application.
When a user starts a stopwatch, I need a stopwatch to continue working even after the user logs out. And run it until it logs in again and stops.
I can run it when I click the start button
stopWatch = new Stopwatch();
stopWatch.Start();
But how can I track it against the user? so after the user logs out and logs in, he will see the elapsed time, including the time during which he was not active in the application?
therefore, after the user logs in and press the stop button, he should receive the elapsed time, including all the time.
TimeSpan ts = stopWatch.Elapsed;
is it better to use the angular directive / javascript timer?
source
share