Не за что
class startTime {
constructor(){
this.count();
}
count(){
var date = new Date();
var h = date.getHours();
var m = date.getMinutes();
var s = date.getSeconds();
m = this.checkTime(m);
s = this.checkTime(s);
document.getElementById('clock').innerHTML = h + ":" + m + ":" + s;
setTimeout(this.count.bind(this), 500);
}
checkTime(i) {
if (i < 10) i = "0" + i;
return i;
}
}
var Clock=new startTime();