(MS-DOS) Delay Time

I went through several ways to cause a time delay such as pings and dirs. Although none of them is truly accurate, is there a suitable way to cause a time delay?

I have heard of a few things, although they do not work on all computers, not on my Windows XP or Windows NT in college.

It takes a lot of time to go through all the files on Google in order to find a good answer, and since I have not yet found the stack overflow question, I thought it would be nice to create the question itself;)

+3
source share
5 answers

Sleep

This will allow you to do this.

+6
source

<warning>This is a hack</warning>

( MS-DOS) , , , , , .

, DOS.

+5

, DEBUG sleep , .

EDIT: . , - DEBUG. , CHOICE commad.

type nul|choice /c:y /t:y,nn > nul

, , XP, WAAYY .

+2

"... ...."

DOS.

0

, .

, , :

  • % time% ( ":" "." ) - , - ( , , )

  • set/A, 1 , , (X: 00: 00.00). ( ) .

  • , var ( 2) ( min + sec ) , .

- , "set/A". , ( ) , 08 09 ( 08 09).

: . , :

verify other 2>nul
setlocal enableextensions
if errorlevel 1 goto err

"err".

, "endlocal" .

By the way, this applies only to Windows XP Service Pack 2 or 3 ONLY .

0
source

Source: https://habr.com/ru/post/1706840/


All Articles