Edit in JSFiddle

var second = 1000,
    times = [];

function pad(num) {
  return ('0' + num).slice(-2);
}

function updateClock() {
  var clockEl = document.getElementById('clock'),
    dateObj = new Date(); 
  clockEl.innerHTML = pad(dateObj.getHours()) + ':' + pad(dateObj.getMinutes()) + ':' + pad(dateObj.getSeconds());
}

function clockTimer(fn) {
    var time = second - (Date.now() % second);
    
    setTimeout(function() {
        addTimeShowTimes(Date.now());
        fn();
        clockTimer(fn);
    }, time);
}
function addTimeShowTimes(time) {
    times.unshift(time);
    if (times.length > 10) {
      times.pop();    
    }
    document.getElementById('times').innerHTML = times.join('<br />');
}

clockTimer(updateClock);
<div id="clock"></div>
<strong><br />Last 10 times:</strong>
<div id="times"></div>