SYNOPSIS
#include <signal.h>
#include <time.h>
int timer_create(clockid_t clockid, struct sigevent *evp, timer_t *timerid);
DESCRIPTION
The
You can specify the asynchronous notification that takes place when the newly created timer expires by pointing evp at a sigevent structure. However, if evp is a null pointer, the results are the same as having pointed evp at a sigevent structure with its sigev_notify member set to SIGEV_SIGNAL, its sigev_signo set to the default signal number, and its sigev_value set to the value pointed to by timerid.
Child processes created with the
- Note:
-
Timers are active in a child created with
vfork() . Thus, attempting to manipulate such a timer between avfork() call and anexec() call results in that timer being modified in the parent process.
PARAMETERS
- clockid
-
Specifies the ID of the clock on which the new timer is based. On the NuTCRACKER Platform, this can only be CLOCK_REALTIME.
- evp
-
Identifies the asynchronous notification to take place when the timer expires. Normally, this is a pointer to a sigevent structure.
- timerid
-
Points to the location where this function stores the timer ID for the newly created timer.
RETURN VALUES
When successful,
Otherwise, it returns -1 and sets errno to one of the following:
- EFAULT
-
The clock_id argument is a bad pointer.
- EINVAL
-
The value specified for clock_id is not a valid clock ID.
- ENOTSUP
-
The clock specified by clock_id is not supported for this function on the NuTCRACKER Platform.
CONFORMANCE
UNIX 03.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
None.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
- Functions:
clock_getres() ,timer_delete() ,timer_getoverrun()
- Miscellaneous:
- struct sigevent
PTC MKS Toolkit 10.4 Documentation Build 39.