We are currently developing an AngularJS application that presents users with questions and keeps track of the number of correct answers within a strict 20-minute time limit. However, there are some challenging requirements we need to consider:
Accuracy Concerns
It is imperative that the error for the 20-minute timeout does not exceed 2 seconds, even on slower devices such as Android 2.3 tablets or iPad 2.
Tolerance for Local Time Changes
The timing of the timeout should remain unaffected by any changes made to the computer's local time. We cannot automatically assume a user is cheating if such a change is detected, as it could be due to a legitimate NTP update.
Progress Monitoring
Users must be constantly reminded of the remaining time with a ticking countdown that accounts for any UI lag without accumulating errors.
-
We have explored various methods that did not meet our requirements:
windows.performance.now
: not widely implemented (and not compatible with Mobile Safari)- Server pingbacks: cannot rely on a constant internet connection
Is it feasible to meet all of these requirements simultaneously?