suspend a process for a given length of time
#include <i86.h> unsigned int delay( unsigned int milliseconds );
The delay() function suspends the calling process until:
or
The suspension time may be greater than the requested amount, due to the scheduling of other, higher priority activity by the system. |
0 if the full time specified was completed, or the number of milliseconds unslept if interrupted by a signal.
When an error has occurred, errno contains a value that indicates the type of error:
#include <i86.h> void main() { sound( 200 ); delay( 500 ); /* delay for 1/2 second */ nosound(); }
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |