SCO OpenServer
delay(D3oddi)
delay --
delay process execution for specified time
Synopsis
void delay(int ticks);
Description
The
delay( )
function uses the
timeout(D3oddi),
sleep(D3oddi)
and
wakeup(D3oddi)
calls to block the current process
for a duration equivalent to
the specified number of clock ticks.
The exact length of the delay is not guaranteed but it will not be less
than ticks -1 clock ticks.
The length of a clock tick can vary across different implementations
so drivers should not include
any hard-coded assumptions about the length of a tick.
Arguments
ticks-
integer that specifies the number of
clock ticks to delay.
Return values
None.
Usage
The
delay( )
function does not degrade performance
as much as the
suspend( )
function does.
Context and synchronization
User or blockable
context.
Hardware applicability
All
Version applicability
oddi:
1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp, 6, 6mp
Differences between versions
For ODDI versions prior to version 6
that do not support the high-precision system clock,
delay( )
blocks the current process for the absolute number
of clock ticks that are specified.
See
``Clock, system'' in HDK Technical Reference
for more information about the high-precision system clock.
SVR5 DDI compatibility
The
delay(D3)
function is the same as the
delay(D3oddi)
function.
DDI drivers use the
drv_usectohz(D3)
and
drv_hztousec(D3)
functions as necessary
to convert between clock ticks and microseconds
(implementation independent units).
References
sleep(D3oddi),
suspend(D3oddi),
timeout(D3oddi),
wakeup(D3oddi)
``Delays and busy-waits'' in HDK Technical Reference
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 5 HDK - June 2005