### Tsetitimer()

LONG Tsetitimer(which, interval, value, ointerval, ovalue)

WORD which;
LONG *interval;
LONG *value;
LONG *ointerval;
LONG *ovalue;

| Tsetitimer() schedule an interval timer.
Opcode | 329 (0x0149)
Availability | Available when a 'MiNT' cookie with a version of at least 1.11 exists.
Parameters | which specifies the type of timer to use: ITIMER_REAL (0). The timer decrements in real time. A SIGALRM signal is delivered when the timer expires. ITIMER_VIRTUAL (1). The timer decrements in process virtual time. It runs only when the process is executing. A SIGVTALRM signal is delivered when it expires. ITIMER_PROF (2). The timer decrements both in process virtual time and when the system is running on behalf of the process. It is designed to be used by interpreters in statistically profiling the execution of interpreted programs. Each time the ITIMER_PROF timer expires, the SIGPROF signal is delivered. The rest of the parameters are pointers to millisecond values. interval is the value to which the timer will be reset when it expires. It is useful to program a timer that sends signals at regular time intervals. value is the current timer value. You must initialize it to a non-zero value for the timer to be launched (give it the value of interval if you want regular signals). When you want to stop it, call the function again with the LONG pointed to by value set to 0. The LONG pointed to by value is not decreased as time passes. ointerval and ovalue are the values used for the last call of the function.
Binding |
    pea     ovalue
    pea     ointerval
    pea     value
    pea     inteval
    move.w  which,-(sp)
    move.w  #$0149,-(sp)
    trap    #1
    lea     $12(sp),sp
Return Value | Tsetitimer() returns E_OK or a negative GEMDOS error code otherwise.
Comments | If you just want to run the timer once, maybe you can use Talarm() or Tmalarm().