int
timer_create(
clockid_t clockid
, struct sigevent * restrict evp
, timer_t * restrict timerid
)
)
function creates a per-process timer using the clock specified in the
clockid
argument.
If it succeeds, the
timer_create(
)
function fills in the
timerid
argument with an id associated with the timer created that can be used by
other timer related calls.
The
clockid
must be a valid clock id as defined in
<
time.h
>.
The timer is created in a disarmed state.
An optional
(non-NULL
)
sigevent argument can be specified by the
evp
argument.
If the
evp
argument is
NULL
,
then it defaults to
sigev_notify
set to
SIGEV_SIGVAL
and
sigev_value
set to
timerid.
See
siginfo(2)
for accessing those values from a signal handler.
)
function returns 0, and fills in the
timerid
argument with the id of the new timer that was created.
Otherwise, it returns -1, and sets
errno
to indicate the error.
)
function will fail if:
EAGAIN
]
EINVAL
]