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

Jerold Schulman

October 1, 2001

1 Min Read
ITPro Today logo in a gray background | ITPro Today


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

I quote:UsageThe program is executed using the syntax:DOZE for example, to pause for 20 seconds: DOZE 20If the program is executed without a command-line argument, the program willpause for 10 seconds. If the program is executed with an invalid command-lineargument, it will be ignored and the default pause value of 10 seconds willbe used.Just before commencing the specified sleep period, the program will displaythe following message:Dozing for nn seconds .....where nn represents a supplied sleep value or the default of 10 seconds if nocommand-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 followingmessage 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, usingthe > redirection character. For example: DOZE > doze.txtThe nul device may also be used if required, if DOZE.EXE's message output is not required. For example:DOZE > nulExample usage-------------The following example illustrates the program's use within a batch file:@echo offrem Execute the first program.prog1rem Pause for 30 seconds before starting the second program.doze 30rem Execute the second program.prog2



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like