drv_hztousec man page on OpenIndiana

Man page or keyword search:  
man Server   20441 pages
apropos Keyword Search (all sections)
Output format
OpenIndiana logo
[printable version]

drv_hztousec(9F)	 Kernel Functions for Drivers	      drv_hztousec(9F)

NAME
       drv_hztousec - convert clock ticks to microseconds

SYNOPSIS
       #include <sys/types.h>
       #include <sys/ddi.h>

       clock_t drv_hztousec(clock_t hertz);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/DKI).

PARAMETERS
       hertz	The number of clock ticks to convert.

DESCRIPTION
       The   drv_hztousec()  function  converts	 into  microseconds  the  time
       expressed by hertz, which is in system clock ticks.

       The length of time the system has been up since boot can	 be  retrieved
       by calling ddi_get_lbolt(9F), which will return a value of type clock_t
       containing the number of clock ticks since boot. Drivers often use  the
       value of lbolt before and after an I/O request to measure the amount of
       time it took the device to  process  the	 request.  The	drv_hztousec()
       function	 can  be  used by the driver to convert the reading from clock
       ticks to a known unit of time.

RETURN VALUES
       The number of microseconds equivalent to the hertz parameter. No	 error
       value  is returned. If the microsecond equivalent to hertz is too large
       to be represented as a clock_t, then the maximum clock_t value will  be
       returned.

CONTEXT
       The drv_hztousec() function can be called from user, interrupt, or ker‐
       nel context.

SEE ALSO
       ddi_get_lbolt(9F), drv_usectohz(9F), drv_usecwait(9F)

       Writing Device Drivers

SunOS 5.11			  4 Sep 2009		      drv_hztousec(9F)
[top]

List of man pages available for OpenIndiana

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net