This is the perfect use case for .setInterval()(Scroll down to the setIntervall() part below setTimeout())
var myVar = setInterval(myTimer, 1000);
function myTimer() {
var d = new Date();
var t = d.toLocaleTimeString();
console.log(t);
}