Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

RtTimerCreate()

Create a realtime timer

Synopsis:

#include <photon/realtime/RtTimer.h>

RtTimer_t *RtTimerCreate( clockid_t clock_id,
                          int prio,
                          RtTimerCbF_t *cb,
                          void *data );

Arguments:

clock_id
The clock source; see the documentation for timer_create() in the QNX Neutrino Library Reference for the possible values.
prio
The priority of the Photon pulse that will be used when the timer expires. If priority is -1, the pulse's priority is the same as that of the calling process.
cb
A pointer to the function that you want called when the timer expires. The RtTimerCbF_t type is:
typedef int RtTimerCbF_t( RtTimer_t *timer,
                          void *data );
  
data
A pointer to a block of data that's passed to the cb function as the data argument.

Library:

ph

Description:

This function creates a realtime timer. The timer is disabled when created; it isn't enabled until you call RtTimerSetTime().

Returns:

A pointer to a RtTimer_t structure to be passed to the other routines dealing with realtime timers, or NULL if an error occurred.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

RtTimerDelete(), RtTimerGetTime(), RtTimerSetTime()

Timers in the Working with Code chapter of the Photon Programmer's Guide

timer_create() in the QNX Neutrino Library Reference