Header File
dos.h
Category
Process Control Routines
Prototype
void _sleep(unsigned seconds);
Description
Suspends execution for an interval (seconds).
With a call to _sleep, the current program is suspended from execution for the number of seconds specified by the argument seconds. The interval is accurate only to the nearest hundredth of a second or to the accuracy of the operating system clock, whichever is less accurate.
Return Value
None.
Example
#include <dos.h> #include <stdio.h> int main(void) { int i; for (i=1; i<5; i++) { printf("Sleeping for %d seconds\n", i); _sleep(i); } return 0; }
Portability
POSIX |
Win32 |
ANSI C |
ANSI C++ |
|
+ |
|
|
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|