HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
g
gettimer(3C) gettimer(3C)
NAME
gettimer - get value of a per-process timer
SYNOPSIS
#include <sys/timers.h>
int gettimer(timer_t timerid, struct itimerspec *value);
DESCRIPTION
The gettimer() function returns an itimerspec structure value to the value argument. The
it_value member of the structure represents the amount of time in the current interval before the timer
expires for the timer specified in timerid, or zero if the timer is disabled. The it_interval member
has the value last set by reltimer() (see reltimer(3C)). The members of value are subject to the reso-
lution of the timer (see mktimer(3C)).
The behavior of this function is undefined if value is NULL.
APPLICATION USAGE
gettimer() is thread-safe. It is not async-cancel-safe.
RETURN VALUE
Upon successful completion, gettimer() returns zero; otherwise, it returns −1 and sets errno to indi-
cate the error.
ERRORS
gettimer() fails if any of the following conditions are encountered:
[EINVAL] timerid does not correspond to an ID returned by
mktimer().
[EIO] An error occurred while accessing the clock device.
FILES
/usr/include/sys/timers.h
SEE ALSO
timer_gettime(2), mktimer(3C), reltimer(3C).
STANDARDS CONFORMANCE
gettimer(): AES
HP-UX Release 11i: December 2000 − 1 − Section 3−−361
___
___