Analog-Clock JavaScript Timing Events The window object allows execution of code at specified time intervals The setInterval() method The setInterval() method repeats a given function at a given time-interval. Example : setInterval(myFunction, 2000); function myFunction(){ console.log("Hello World"); } Live Preview Analog-Clock