- create a per-process timer (REALTIME)
#include <time.h> int
Fa clockid_t clockid struct sigevent *restrict evp
Fa timer_t *restrict timerid
system call creates a per-process timer using the specified clock,
Fa clock_id ,
as the timing base.
system call returns, in the location referenced by
Fa timerid ,
a timer ID of type
used to identify the timer in timer requests.
This timer ID is unique within the calling process until the timer is deleted.
The particular clock,
Fa clock_id ,
is defined in
In time.h .
The timer whose ID is returned is in a disarmed state upon return from
points to a
allocated by the application, defines the asynchronous notification to occur
when the timer expires.
the effect is as if the
argument pointed to a
structure with the
member having the value
having a default signal number, and the
the value of the timer ID.
The implementations supports a
if the attribute pointed to by
a thread stack address specified by a call to
the results are unspecified if the signal is generated more than once.
If the call succeeds,
returns zero and updates the location referenced by
Vt timer_t ,
which can be passed to the per-process timer calls.
If an error
occurs, the system call returns a value of -1
and the global variable
is set to indicate the
The value of
is undefined if an error occurs.
will fail if:
Bq Er EAGAIN
The calling process has already created all of the timers it is allowed by
Bq Er EINVAL
The specified clock ID is not supported.
Bq Er EFAULT
Any arguments point outside the allocated address space or there is a
memory protection fault.