suspend a process for a given length of time
Synopsis:
#include <i86.h>
unsigned int delay( unsigned int milliseconds );
Description:
The delay() function suspends the calling process until:
- the number of real time milliseconds specified by the
milliseconds argument have elapsed
- or a signal whose action is either to terminate
the process or call a signal handler is received.
The suspension time may be greater than the requested amount, due to
the scheduling of other, higher priority activity by the system.
Returns:
The delay() function returns zero if the full time specified was
completed; otherwise it returns the number of milliseconds unslept if
interrupted by a signal.
Errors:
When an error has occurred, errno contains a value that indicates
the type of error:
- EAGAIN
- No timer resources were available to satisfy the request.
See also:
alarm(),
errno,
sleep()
Examples:
#include <i86.h>
void main()
{
sound( 200 );
delay( 500 ); /* delay for 1/2 second */
nosound();
}
Classification:
WATCOM
Systems:
All (except Netware, DOS/PM)