Timer Entity

group TimerEntity

The Timer Entity provides access to a simple scheduler. Reflex routines can be written which will be executed upon expiration of the timer entity. The timer can be set to fire only once, or to repeat at a certain interval.

void timer_getExpiration(unsigned int *id, struct Result *result, int timerNum)

Get the currently set expiration time in microseconds. This is not a “live” timer. That is, it shows the expiration time originally set with setExpiration; it does not “tick down” to show the time remaining before expiration.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the current expiration in microseconds or a non zero Error code.

  • timerNum: The index of the Timer entity.

void timer_setExpiration(unsigned int *id, struct Result *result, int timerNum, int value)

Set the expiration time for the timer entity. When the timer expires, it will fire the associated timer[index]() reflex.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • timerNum: The index of the Timer entity.

  • value: The expiration to be set in microseconds.

void timer_getMode(unsigned int *id, struct Result *result, int timerNum)

Get the mode of the timer which is either single or repeat mode.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and current timer mode or a non zero Error code.

  • timerNum: The index of the Timer entity.

void timer_setMode(unsigned int *id, struct Result *result, int timerNum, int mode)

Set the mode of the timer which is either single or repeat mode. fire the associated timer[index]() reflex.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • timerNum: The index of the Timer entity.

  • mode: The mode to be set. aTIMER_MODE_REPEAT or aTIMER_MODE_SINGLE.