Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mktimer(3c) [hpux man page]

mktimer(3C)															       mktimer(3C)

NAME
mktimer - allocate a per-process timer SYNOPSIS
DESCRIPTION
The function is used to allocate a per-process timer using the specified system-wide clock as the timing base. returns an unique timer ID of type used to identify the timer in timer requests (see gettimer(3C)). specifies the system-wide clock to be used as the timing base for the new timer. specifies the mechanism by which the process is to be notified when the timer expires. supports one per-process timer with a of and of If is the system causes a signal to be sent to the process whenever the timer expires. For the machine-dependent clock resolution and maximum value are and seconds, respectively. These constants are defined in RETURN VALUE
Upon successful completion, returns a which can be passed to the per_process timer calls. If unsuccessful, returns a value of and sets to indicate the error. ERRORS
fails if any of the following conditions are encountered: [EAGAIN] The calling process has already allocated all of the timers it is allowed. [EINVAL] is not defined, or does not allow the specified notification mechanism. FILES
SEE ALSO timers(2), getclock(3C), gettimer(3C), reltimer(3C), rmtimer(3C), setclock(3C), thread_safety(5). STANDARDS CONFORMANCE
mktimer(3C)

Check Out this Related Man Page

reltimer(3)						     Library Functions Manual						       reltimer(3)

NAME
reltimer - Establishes timeout intervals of a per-process timer LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/timers.h> int reltimer( timer_t tmrid, struct itimerspec *val, struct itimerspec *oval) ; PARAMETERS
Specifies the per-process timer to access. Points to a type itimerspec structure containing the values of the initial and offset timeout intervals. Points to a type itimerspec structure where the current value of the timer timeout interval and the time-to-go are to be stored. DESCRIPTION
The reltimer() function establishes initial and offset timeout intervals of a per-process timer specified by the tmrid parameter. Initial and offset timeout interval information is stored in an itimerspec structure pointed to by the val parameter. When the per-process timer specified by the tmrid parameter is active, after timeout of the initial time interval, all subsequent timeouts are controlled by the off- set timeout value; as long as tmrid continues to operate, the offset values pointed to by the val parameter are used as the per-process timeout interval. The current timeout interval and the time-to-go are returned to the location pointed to by the oval parameter. Initial and offset time information for the per-process timer is stored in space reserved by a type itimerspec structure pointed to by the val parameter. A type itimerspec structure is also used to store returned time information specified by the oval parameter. The itimerspec structure is defined in the sys/timers.h include file. NOTES
Time values smaller than the resolution of the specified timer are rounded up to the resolution value. Time values larger than the maximum timeout value of the specified per-process timer are rounded down to that maximum value. Trial use RETURN VALUES
Upon successful completion, the reltimer() function returns 0 (zero). Otherwise, -1 is returned and errno is set to indicate the error. ERRORS
If the reltimer() function fails, errno may be set to the following value: The timerid parameter does not specify an allocated per-process timer, or the val parameter points to a nanosecond value less than zero or greater than or equal to 1000 million. RELATED INFORMATION
Functions: alarm(3), getclock(3), gettimer(3), mktimer(3) delim off reltimer(3)
Man Page