...
Code Block | ||||
---|---|---|---|---|
| ||||
var count = 300; // 300 seconds or 5 minutes
setInterval(function() {
count = count - 1;
if (count < 0) {
alert("You have been inactive for more than 5 minutes. Your session will terminate.");
// to do - quit program or end session here
}
}, 1000); // call this every second (1000 milliseconds)
pui.onuseractivity = function() {
// reset counter
counter = 300;
}
|
...