Writing Device Drivers

Time-Related Functions

Table B-25 Time-Related Functions

Function Name 

Description 

ddi_get_lbolt 

returns clock ticks since reboot 

ddi_get_time 

return the current time in seconds 

delay 

delay execution for a specified number of clock ticks 

drv_hztousec 

convert clock ticks to microseconds 

drv_usectohz 

convert microseconds to clock ticks 

drv_usecwait 

busy-wait for specified interval 

timeout 

execute a function after a specified length of time 

untimeout 

cancel previous timeout function call 

drv_getparm 

ddi_get_lbolt, ddi_get_time  

Table B-26 Deprecated Time-Related Functions

Deprecated Function 

Replacement 

drv_getparm 

ddi_get_lbolt, ddi_get_time