Allocates a per-process interval timer.
Standard C Library (libc.a)
#include <sys/time.h>
#include <sys/events.h>
timer_t gettimerid( TimerType, NotifyType)
int TimerType;
int NotifyType;
The gettimerid subroutine is used to allocate a per-process interval timer based on the timer with the given timer type. The unique ID is used to identify the interval timer in interval timer requests. (See getinterval subroutine). The particular timer type, the TimerType parameter, is defined in the sys/time.h file and can identify either a systemwide timer or a per-process timer. The mechanism by which the process is to be notified of the expiration of the timer event is the NotifyType parameter, which is defined in the sys/events.h file.
The TimerType parameter represents one of the following timer types:
Interval timers with a notification value of DELIVERY_SIGNAL are inherited across an exec subroutine.
NotifyType | Notifies the process of the expiration of the timer event. |
TimerType | Identifies either a systemwide timer or a per-process timer. |
If the gettimerid subroutine succeeds, it returns a timer_t structure that can be passed to the per-process interval timer subroutines, such as the getinterval subroutine. If an error occurs, the value -1 is returned and errno is set.
If the gettimerid subroutine fails, the value -1 is returned and errno is set to one of the following error codes:
EAGAIN | The calling process has already allocated all of the interval timers associated with the specified timer type for this implementation. |
EINVAL | The specified timer type is not defined. |
The exec (exec: execl, execle, execlp, execv, execve, execvp, or exect Subroutine) subroutine, fork (fork, f_fork, or vfork Subroutine) subroutine, getinterval, incinterval, absinterval, resinc, or resabs (getinterval, incinterval, absinterval, resinc, resabs, alarm, ualarm, getitimer or setitimer Subroutine) subroutine, gettimer, settimer, or restimer (gettimer, settimer, restimer, stime, or time Subroutine) subroutine, reltimerid subroutine.
List of Time Data Manipulation Services in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.
Subroutines Overview in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.