http://learn.javascript.ru/settimeout-setinterval
<input type="button" value="start" id="but">
<div id="div">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
<script>
window.onload = function () {
var but = document.getElementById('but');
var div = document.getElementById('div');
var divs = div.children;
var len = divs.length;
var i = 0;
var t = 0;
var d, now;
function show() {
elem = divs[i];
d = new Date();
setTimeout(function () {
now = new Date();
divs[i].innerHTML = now + '; ' + (now - d) + ' ms';
d = now;
i++;
t = t + 1000;
if(i == len) {i = 0; t = 0; alert('The End'); return} else {show()}
}, t)
}
but.onclick = function () {
show()
}
}
</script>