Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

(MS-DOS) Time Delays

Tags:

time

delay

dos

I came past a few ways to cause a time delay such as pings and dirs. Though none of them are really precise, is there anny proper way to cause a time delay?

I heard about a few things though they don't work on all computers, not on my Windows XP nor the Windows NT at college.

It takes ages going through all files on Google finding a good answer, and since I didn't yet find the question on Stack Overflow I thought it might be good to just create the question myself ;)

like image 799
billyy Avatar asked Mar 06 '26 09:03

billyy


2 Answers

Sleep

It will allow you to do this.

like image 58
aintnoprophet Avatar answered Mar 11 '26 08:03

aintnoprophet


<warning>This is a hack</warning>

Use your favorite programming language (other than MS-DOS batch) and create an application which takes one argument, the number of milliseconds to wait, then, simply call this program from a batch file to sleep the required amount.

As far as I know, this is the only reliable way to do it in DOS.

like image 39
Ben S Avatar answered Mar 11 '26 07:03

Ben S



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!