NAME
          irStartTimer, irCancelTimer, irStartPTimer, irCancelPTimer -
          start/stop the clock timer

     SYNOPSIS
          #include <irapi.h>

          int irStartTimer (channel_id cid, int interval, int repeat,
          int tag);

          int irCancelTimer (channel_id cid, int tag);

          int irStartPTimer (int interval, int repeat, int tag);

          int irCancelPTimer (int tag);

     DESCRIPTION
          The irStartTimer function starts a timer to go off after
          interval milliseconds (subject to inherent clock granularity
          - 10 milliseconds for a 486 central processing unit).  Mul-
          tiple clock timers may be started per channel if all timers
          per channel have unique tags.  The tag is returned with the
          subsequent IRE_CLOCK event.

          If repeat is non-zero, the clock goes off again after
          interval more milliseconds, indefinitely.

          irCancelTimer cancels the timer on cid with the indicated
          tag.

          irStartPTimer and irCancelPTimer are similar to irStartTimer
          and irCancelTimer except that the timers are process based
          rather than channel identifer (cid) based.

     EVENTS
          IRE_CLOCK occurs when interval elapses. If repeat is non
          zero, multiple IRE_CLOCK events occur.

          When using irStartTimer, the subsequent IRE_CLOCK event's
          cid element is valid.  When using irStartPTimer, the subse-
          quent IRE_CLOCK event's cid element is set to IRD_NULL.

     RETURN VALUE
          IRR_OK is returned if irStartTimer and irStartPTimer are
          successful.

          The number of milliseconds remaining on the timer is
          returned if irCancelTimer and irCancelPTimer are successful.

          IRR_FAIL is returned for all functions if an error occurs.

     ERROR
          irError is set as follows if an error occurs:

          IRER_INVALID if:

               o the cid is invalid

               o the interval is invalid

               o the cid already has a timer with this tag (irStartTi-
                 mer only)

               o the cid has no timer with this tag (irCancelTimer
                 only)

               o the calling process already has a timer with this tag
                 (irStartPTimer only)

               o the calling process has no timer with this tag
                 (irCancelPTimer only)

          IRER_SYSERROR if a system or driver call failure occurs
          (check irSysError for additional information)

     SEE ALSO
          irTTTimer(3IRAPI), irRecogTimer(3IRAPI) and
          IrEVENTS(4IRAPI).

     BUGS
          On a lightly loaded system it is possible that the IRE_CLOCK
          event is not reported to an application until at least one
          second has passed the requested interval length.

     VERSION
          This is version 8/31/00 of this man page.