About 103,000 results
Open links in new tab
  1. javascript - Calling a function every 60 seconds - Stack Overflow

    Oct 27, 2017 · Using setTimeout() it is possible to launch a function at a specified time: setTimeout(function, 60000); But what if I would like to launch the function multiple times? …

  2. html - How to create a simple JavaScript timer? - Stack Overflow

    Jul 22, 2015 · const callback = => { console.log('callback function called from timer'); } Create timer instance const timer = new Timer(); set method take 3 arguments. time; dom element id; …

  3. Is there any way to call a function periodically in JavaScript?

    Aug 3, 2009 · "it shields you against multiple parallel executions of the callback function, should it take longer than the given interval to execute (it maintains an internal “running” flag, which is …

  4. How to create an accurate timer in javascript? - Stack Overflow

    Apr 30, 2015 · timer.stop(): Kills the timer immediately (and permanently). Returns the frame index for the next (cancelled) frame. timer.adapt(Number): Takes a frequency in Hertz and …

  5. How to write a countdown timer in JavaScript? - Stack Overflow

    3) The timer never shows 5:00 but instead shows 4:60, etc. 4) When the timer gets to 0 minutes and 60 seconds, the timer starts over again when there's still a minute left according to the …

  6. javascript - Wait 5 seconds before executing next line - Stack …

    Inside an async scope (i.e. an async function), you can use the "await" keyword to wait for a Promise to resolve before continuing to the next line of the function. This is functionally …

  7. How to measure time taken by a function to execute

    Nov 24, 2008 · Don't use Date(). Read below. Use performance.now():. const a = performance.now(); alert('do something...'); const b = performance.now(); alert('It took ' + (b - a ...

  8. jquery - Loop timer in JavaScript - Stack Overflow

    function update(){ i++; document.getElementById('tekst').innerHTML = i; setInterval(update(),1000); } This means that you have to create a function in which you do the …

  9. javascript - Create a simple 10 second countdown - Stack Overflow

    Jun 29, 2015 · JavaScript has built in to it a function called setInterval, which takes two arguments - a function, callback and an integer, timeout. When called, setInterval will call the function you …

  10. html - How to stop timer in javascript? - Stack Overflow

    Mar 22, 2018 · how to stop timer with another function javascript. 1. Stopping a timer. 0. Javascript timer, with stop ...

Refresh