1var timeout = setTimeout(function() {}, 3600 * 1000);
2
3setInterval(function() {
4 console.log('Time left: '+getTimeLeft(timeout)+'s');
5}, 2000);
6
7function getTimeLeft(timeout) {
8 return Math.ceil((timeout._idleStart + timeout._idleTimeout - Date.now()) / 1000);
9}
10