-
Notifications
You must be signed in to change notification settings - Fork 0
sleep
Thomas Foster edited this page Mar 22, 2021
·
1 revision
Function Suspends execution for an interval (seconds).
Syntax void sleep(unsigned seconds);
Prototype in dos.h
Return value None.
See also delay
With a call to sleep, the current program is suspended from execution for the number of seconds specified by the argument seconds.
#include <dos.h>
#include <conio.h>
int main()
{
initdos();
cprintf("My Program (C) 2021\n");
cprintf("by Me");
sleep(3); /* pause to let the user read the program info */
clrscr();
/* run program
while (1) {
/* ... */
}