Мир «Детей Пространства»
Artifact [e14df013b1]
00000
00000
00:00:00
Not logged in

Artifact e14df013b124e46f87ef8fca657e4b64cdd070f8:


function checkTime(i,filler) {
	if (i <10) {
		return filler+i.toString();
	} else {
		return i.toString();
	}
}	

function tickClock() {
	d=new Date()
	space=d.getTime().toString()

	document.getElementById("clock-mega").innerHTML=space.slice(0,4);
	document.getElementById("clock-lakh").innerHTML=space.slice(4,5);
	document.getElementById("clock-hundred").innerHTML=space.slice(5,8);
	document.getElementById("clock-sec").innerHTML=space.slice(8,10);
	document.getElementById("clock-min").innerHTML=checkTime(d.getHours(),' ')+":"+checkTime(d.getMinutes(),'0')+":";
	document.getElementById("clock-earthsec").innerHTML=checkTime(d.getSeconds(),'0');
	var t = setTimeout(function(){tickClock()},500);
}