Take Command / TCC Help v. 13.03
DELAY
Hide Navigation Pane
DELAY
Previous topic Next topic No directory for this topic No expanding text in this topic  
DELAY
Previous topic Next topic Topic directory requires JavaScript JavaScript is required for expanding text JavaScript is required for the print function Mail us feedback on this topic!  

Comments (...)

Purpose:Pause for a specified length of time.

 

Format:DELAY [/B /F /M time]

DELAY UNTIL [yyyy-mm-dd] hh:mm[:ss]

 

timeThe number of seconds or milliseconds to delay.

 

/B(reak enabled)/M(illiseconds)

/F(lush keyboard)

 

Usage:

 

DELAY is useful in batch file loops while waiting for something to occur. For example, to wait for 10 seconds:

 

delay 10

 

DELAY is most useful when you need to wait a specific amount of time for an external event, or check a system condition periodically. For example, this batch file checks the battery status (as reported by your Advanced Power Management drivers) every 15 seconds, and gives a warning when battery life falls below 30%:

 

do forever

  iff %_apmlife lt 30 then

     beep 440 4 880 4 440 4 880 4

     echo Low Battery!!

  endiff

  delay 15

enddo

 

The maximum time value is limited to about 49 days in Windows XP, and 585 million years in Windows Vista, Windows 2008, Windows 7.  If you don't enter a time, the default is 1 second.

 

You can optionally wait until the specified date and time.  If no date is specified, DELAY defaults to today.

 

TCC uses the minimum possible processor time during a DELAY, in order to allow other applications full use of system resources.

 

You can cancel a delay by pressing Ctrl-C or Ctrl-Break.

 

Options:

 

/BAllows terminating a DELAY by pressing a key.

 

/FFlush the keyboard buffer when DELAY ends. (Not available in TCC/LE.)

 

/MCount by milliseconds instead of seconds. Normally only used for delays of less than 1 second.

Comments (...)