JSI Tip 4170. Freeware DOZE allows you to sleep for n seconds.


If you don't have Sleep, you can download DOZE.ZIP.

I quote:

Usage

The program is executed using the syntax:

DOZE <number of seconds to pause/sleep>

for example, to pause for 20 seconds: 

DOZE 20

If the program is executed without a command-line argument, the program will
pause for 10 seconds. If the program is executed with an invalid command-line
argument, it will be ignored and the default pause value of 10 seconds will
be used.

Just before commencing the specified sleep period, the program will display
the following message:

Dozing for nn seconds .....

where nn represents a supplied sleep value or the default of 10 seconds if no
command-line argument was supplied.

If a non-numeric command-line argument is supplied to the program, the 
following message will be observed:

Invalid command-line argument - using default doze value (10 seconds).

If a negative numeric value is supplied to the program, the following
message will be observed:

Negative doze value supplied (-nn) ... correcting.

where -nn represents a negative number.

Note that the program's output may be directed to stdout if required, using
the > redirection character. For example: 

DOZE > doze.txt

The nul device may also be used if required, if DOZE.EXE's message output is 
not required. For example:

DOZE > nul


Example usage
-------------

The following example illustrates the program's use within a batch file:

@echo off
rem Execute the first program.
prog1
rem Pause for 30 seconds before starting the second program.
doze 30
rem Execute the second program.
prog2


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