![]() |
![]() |
![]() |
![]() |
Create a timer for a process
#include <sys/neutrino.h> int TimerCreate( clockid_t id, const struct sigevent *event ); int TimerCreate_r( clockid_t id, const struct sigevent *event );
While the processor isn't in a power-saving mode, CLOCK_SOFTTIME behaves the same as CLOCK_REALTIME.
libc
The TimerCreate() kernel call creates a per-process timer using the clock specified by id as the timing base.
The TimerCreate() and TimerCreate_r() functions are identical except in the way they indicate errors. See the Returns section for details.
Use the returned timer ID in subsequent calls to the other timer functions.
The timer is created in the disabled state, and isn't enabled until you call TimerSettime().
The sigevent structure pointed to by event contains the event to deliver when the timer fires. We recommend the following event types in this case:
These calls don't block.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
sigevent, TimerAlarm(), TimerDestroy(), TimerInfo(), TimerSettime(), TimerTimeout()
![]() |
![]() |
![]() |
![]() |