]>
git.datanom.net - qtadmin.git/blob - js/timer.js
1 /* vim: set ts=4 tw=0 sw=4 noet: */
2 var timerRef
=setInterval(function(){myTimer()},1000);
3 var timeStart
= new Date().getTime() + timeout
;
6 var elapsed
= new Date().getTime();
7 var expire
= timeStart
- elapsed
;
8 var timeLeft
= Math
.round(((expire
% 86400000) % 3600000) / 60000);
12 document
.getElementById("time").style
.background
= "red";
13 clearInterval(timerRef
);
16 timeLeft
= '< ' + timeLeft
+ ' min';
19 document
.getElementById("timer").innerHTML
= timeLeft
;
This page took 0.126533 seconds and 6 git commands to generate.