Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

timer_create(2)

getclock(3C)

gettimer(3C)

reltimer(3C)

rmtimer(3C)

setclock(3C)

mktimer(3C)

NAME

mktimer − allocate a per-process timer

SYNOPSIS

#include <sys/timers.h>

timer_t mktimer(int clock_type, int notify_type, void *itimercbp);

DESCRIPTION

The mktimer() function is used to allocate a per-process timer using the specified system-wide clock as the timing base.  mktimer() returns an unique timer ID of type timer_t used to identify the timer in timer requests (see gettimer(3C)). clock_type specifies the system-wide clock to be used as the timing base for the new timer.  notify_type specifies the mechanism by which the process is to be notified when the timer expires. 

mktimer() supports one per-process timer with a clock_type of TIMEOFDAY and notify_type of DELIVERY_SIGNALS. 

If notify_type is DELIVERY_SIGNALS, the system causes a SIGALRM signal to be sent to the process whenever the timer expires. 

For clock_type TIMEOFDAY, the machine-dependent clock resolution and maximum value are 1/ HZ and MAX_ALARM seconds, respectively.  These constants are defined in <sys/param.h>. 

RETURN VALUE

Upon successful completion, mktimer() returns a timer_t, which can be passed to the per_process timer calls.  If unsuccessful, mktimer() returns a value of (timer_t)−1 and sets errno to indicate the error. 

ERRORS

mktimer() fails if any of the following conditions are encountered:

[EAGAIN] The calling process has already allocated all of the timers it is allowed. 

[EINVAL] clock_type is not defined, or does not allow the specified notification mechanism. 

FILES

/usr/include/sys/timers.h

/usr/include/sys/param.h

SEE ALSO

timer_create(2), getclock(3C), gettimer(3C), reltimer(3C), rmtimer(3C), setclock(3C),

STANDARDS CONFORMANCE

mktimer(): AES

Hewlett-Packard Company  —  HP-UX Release 10.20:  July 1996

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026