Go to the first, previous, next, last section, table of contents.


delay

Syntax

#include <dos.h>

void delay(unsigned msec);

Description

This function causes the program to pause for msec milliseconds. It uses the int 15h delay function to relinquish the CPU to other programs that might need it.

Some operating systems that emulate DOS, such as OS/2 and Windows/NT, hang the DOS session when the Pause key is pressed during the call to delay. Plain DOS and Windows 3.X and 9X are known to not have this bug.

Return Value

None.

Portability

not ANSI, not POSIX

Example

delay(200); /* delay for 1/5 second */


Go to the first, previous, next, last section, table of contents.