About 14,000,000 results
Open links in new tab
  1. How to add sleep/wait function before continuing in JavaScript?

    Jun 4, 2024 · Adding a sleep/wait function in JavaScript means pausing the execution of code for a specified period. This can be done using `setTimeout` for asynchronous waits or through …

  2. Execute script after specific delay using JavaScript

    Jan 12, 2017 · To get it to say 'Hello world' after two seconds, you need to use the following code snippet: return function(){ alert("Hello " + a); It will wait 2 seconds and then popup 'Hello world'. …

  3. JavaScript Timing Events - W3Schools

    Executes a function, after waiting a specified number of milliseconds. Same as setTimeout (), but repeats the execution of the function continuously. The setTimeout() and setInterval() are both …

  4. How can I add a wait without slowing the script? - Roblox

    Sep 21, 2023 · You can try using corutine wraps to have a function or something run without affecting other script, task.wait () might work too. Edit: You can use a debounce without …

  5. How do I pause my shell script for a second before continuing?

    Feb 7, 2014 · Within the script you can add the following in between the actions you would like the pause. This will pause the routine for 5 seconds. read -p "Pause Time 5 seconds" -t 5 read -p …

  6. How to Wait n Seconds in JavaScript? - GeeksforGeeks

    May 3, 2025 · To wait for a specific number of seconds in JavaScript, you can use setTimeout () for simple delays, which triggers a function after a set time in milliseconds.

  7. Wait before firing a function to execute in JavaScript

    Jul 17, 2012 · How can I set a delayed trigger in JavaScript to execute a function after a specified amount of time? My program will wait for 5 seconds to execute demo (); and if it fails to start …

  8. Making script in html run automatically? - Stack Overflow

    Aug 4, 2019 · To make a delay in executing, you should make another function called 'wait' (or something of the sort). When the page loads, you should use the javascript 'setTimeout ()' …

  9. How do I make a batch file wait / sleep for some seconds?

    May 3, 2017 · Call just calls the subroutine, which is the 3 lines I posted above the call command. You can use the timeout command: This utility accepts a timeout parameter to wait for the …

  10. 5 Easy Commands to Delay a Batch File in Windows - wikiHow

    Oct 1, 2024 · If you need some extra time for a command in your batch file to execute, there are several easy ways to delay a batch file. While the well-known sleep command from older …

Refresh