function printInterval (txt) {
  document.getElementById("interval").innerText = txt;
}
setIntervalX = function (callback, delay, repetitions, onCompleted) { var x = 0; var intervalID = window.setInterval(function () { callback(); if (++x === repetitions) { window.clearInterval(intervalID); if(onCompleted) { onCompleted(); } } }, delay); } let startInterval = new Date(); printInterval("Start"); setIntervalX(function(){}, 0, 100, function() { printInterval("done in: " + (new Date() - startInterval) + " msec"); });
Empty

Conclusion

What do you think about the interactive code snippets powered by KLIPSE?