'\"macro stdmacro
.if n .pH ddi_dki.drv_usectohz @(#)drv_usectohz	40.5 of 10/10/89
.\" Copyright 1989 AT&T
.de IX
.ie '\\n(.z'' .tm .Index: \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9	\\n%
.el \\!.IX \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 \\$9
..
.nr X
.if \nX=0 .ds x} drv_usectohz D3DK "" "DDI/DKI" "\&"
.if \nX=1 .ds x} drv_usectohz D3DK "" "DDI/DKI"
.if \nX=2 .ds x} drv_usectohz D3DK "" "\&"
.if \nX=3 .ds x} drv_usectohz "" "" "\&"
.TH \*(x}
.SH "NAME" 
.IX "\f4drv_usectohz\fP(D3DK)"
\f4drv_usectohz\f1 \- convert microseconds to clock ticks
.SH "SYNOPSIS" 
.nf
.na
\f4#include <sys/types.h>
#include <sys/ddi.h>
.sp 0.5
clock_t drv_usectohz(clock_t \f2microsecs\f4);\f1
.ad
.fi
.SH "ARGUMENTS" 
.RS 0n 10
.IP "\f2microsecs\f1" 10n
The number of microseconds to convert to its \f4HZ\f1 equivalent.
.RE
.SH DESCRIPTION 
\f4drv_usectohz\f1 converts a length of time expressed in microseconds
to \f4HZ\f1, the unit of time 
based on the the kernel parameter \f4HZ\f1 whose value
is defined in \f4sys/param.h.\f1 The time arguments to \f4timeout\f1(D3DK)
and \f4delay\f1(D3DK) are expressed in \f4HZ\f1,
as well as the kernel variable
\f4lbolt\f1, which is readable through \f4drv_getparm(LBOLT)\f1.
.P
\f4drv_usectohz\f1 is a portable way for drivers to make calls to
\f4timeout\f1(D3DK) and \f4delay\f1(D3DK) and 
remain binary compatible should the driver
object file be made part of a kernel that was compiled with a value of
\f4HZ\f1 different from that with which the driver was compiled.
.SH "RETURN VALUE" 
The value returned is the 
number of \f4HZ\f1 units equivalent to the \f2microsecs\f1 argument.
No error value is returned. If the \f4HZ\f1 equivalent
to \f2microsecs\f1 is too large to be represented as a \f4clock_t\f1,
then the maximum \f4clock_t\f1 value will be returned.
.SH "LEVEL" 
Base or Interrupt
.SH "SEE ALSO" 
.na
\f4drv_hztousec\f1(D3DK)
.ad
