Create a timer
Synopsis:
timer_t devi_register_timer( input_module_t *module,
int prio,
int *pc,
struct sigevent *evp );
Description:
This function creates a timer. To arm the timer, the caller
must call the OS library time_settime() function.
Note:
The default notification is a pulse when the timer expires.
You can override this by passing a prebuilt event in
evp.
The arguments are:
- module
- Name of module data block.
- prio
- Dispatch priority that will be assigned to the callback
function that processes a pulse. The priority is generated
by an interrupt handler.
- pc
- Pulse code. If the pc argument isn't NULL and
isn't equal to DEVI_PULSE_ALLOC, then it will
be used as the pulse code to associate the
pulse() callback.
- evp
- Pointer to sigevent structure. If
provided, evp is attached to the interrupt (see
InterruptAttachEvent()
in the QNX Neutrino Library Reference.)
Returns:
0 on success, -1 on error.
Classification:
QNX
Safety: |
|
Interrupt handler |
Not applicable |
Signal handler |
Not applicable |
Thread |
Not applicable |