JSI Tip 9243. More about an alternative to the Sleep command.


In An alternative to the Sleep command, we used the @ping -n Times 127.0.0.1>nul syntax of the Packet Inter Net Groper to emulate Sleep.

You may find the following syntax easier to remember:

>nul ping -n Times localhost

where Times should be approximately the number of seconds you wish to delay plus 1.

The valid range of Times is 1 to 4294967295.

This process consumes very few resources.

To Sleep for 15 minutes (900 seconds):

>nul ping -n 901 localhost



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish