It is recommended to approach this in a simple manner, utilizing the [setInterval][1]
function to create a countdown and trigger the postback action.
<div id="timer"></div>
<script type='text/javascript'>
var start = new Date();
setInterval(function() {
// calculate remaining time based on a target of 10 minutes from now
var timeLeft = (600000 - (new Date() - start))/1000;
// update timer display
document.getElementById('timer').innerHTML = Math.floor(timeLeft/60) + ":" + Math.floor(timeLeft%60);
// check if time has run out, then submit form
if (timeLeft > 0) {
document.forms[0].submit();
}
}, 1000);
</script>
Note: As suggested in the comments, it is advisable to verify the actual elapsed time rather than solely relying on the accuracy of setInterval.