osf1 man page for timeout

Query: timeout

OS: osf1

Section: 9r

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

timeout(9r)															       timeout(9r)

NAME
timeout - General: Initializes a callout queue element
SYNOPSIS
void timeout( int (*function) (), caddr_t argument, register int time );
ARGUMENTS
Specifies a pointer to the routine to be called. Specifies a single argument to be passed to the called routine. Specifies the amount of time to delay before calling the specified routine. You express time as time (in seconds) * hz.
DESCRIPTION
The timeout routine initializes a callout queue element to make it easy to execute the specified routine at the time specified in the time argument. You often use callout routines for infrequent polling or error handling. The routine you specify will be called on the interrupt stack (not in processor context) as dispatched from the softclock routine. The global variable hz contains the number of clock ticks per second. This variable is a second's worth of clock ticks. Thus, if you wanted a 4-minute timeout, you would pass 4 * 60 * hz as the third argument to the timeout routine as follows: /* A 4-minute timeout */ . . . timeout(lptout, (caddr_t)dev, 4 * 60 * hz);
NOTES
The granularity of the time delay is dependent on the hardware. For example, the granularity of some Alpha CPUs is 1024 clock ticks per second. Other Alpha CPUs have a granularity of 1200 clock ticks per second. Still other Alpha CPUs exhibit a granularity of 128 clock ticks per second. Because the granularity of the time delay is dependent on the hardware, the operating system provides the hz and lbolt global variables. Use the hz global variable to determine the number of clock ticks per second for a specific Alpha CPU. Use the lbolt global variable as a periodic wakeup mechanism.
RETURN VALUES
None
SEE ALSO
Routines: untimeout(9r) timeout(9r)
Related Man Pages
drv_usectohz(9f) - sunos
drv_usectohz(9f) - redhat
drv_usectohz(9f) - osx
drv_usectohz(9f) - php
drv_usectohz(9f) - linux
Similar Topics in the Unix Linux Community
Passing global variable to a function which is called by another function
Development Release: Mythbuntu 8.04 Alpha 3
Michael4 0.2 (Default branch)
How Wolfram Alpha could change software
What are the two ways the hardware clock can be configured under Linux?