 |
Index for Section 9r |
|
 |
Alphabetical listing for D |
|
 |
Bottom of page |
|
DELAY(9r)
NAME
DELAY - General: Delays the calling routine a specified number of
microseconds
SYNOPSIS
void DELAY(
int Specifies n );
ARGUMENTS
Specifies n
Specifies the number of microseconds for the calling process to spin.
DESCRIPTION
The DELAY routine delays the calling routine a specified number of
microseconds. DELAY spins, waiting for the specified number of
microseconds to pass before continuing execution.
For example, the following code results in a 10000-microsecond (10-
millisecond) delay:
.
.
.
DELAY(10000);
.
.
.
The range of delays is system dependent, due to its relation to the
granularity of the system clock. The system defines the number of clock
ticks per second in the hz variable. Specifying any value smaller than 1 Hz
to the DELAY routine results in an unpredictable delay. For any delay
value, the actual delay may vary by plus or minus one clock tick.
Using the DELAY routine is discouraged because the processor will be
consumed for the specified time interval and therefore is unavailable to
service other processes. In cases where kernel modules need timing
mechanisms, you should use the sleep and timeout routines instead of the
DELAY routine. The most common usage of the DELAY routine is in the system
boot path. Using DELAY in the boot path is often acceptable because there
are no other processes in contention for the processor.
RETURN VALUES
None
SEE ALSO
Routines: sleep(9r), timeout(9r)
 |
Index for Section 9r |
|
 |
Alphabetical listing for D |
|
 |
Top of page |
|