### Talarm()

LONG Talarm( time )

LONG time;

| Talarm() reads/sets a process alarm for the current process.
Opcode | 288 (0x0120)
Availability | This function is available under all MiNT versions integrated with MultiTOS.
Parameters | time specifies the length of time (in seconds) to wait before a SIGALRM signal is delivered. If time is 0 then any previously set alarm is cancelled. If time is negative the function does not modify any alarm currently set.
Binding |
    move.l	time,-(sp)
    move.w	#$0120,-(sp)
    trap	#1
    addq.l	#6,sp
Return Value | Talarm() returns 0 if no alarm was scheduled prior to this call or the amount of time remaining (in seconds) before the alarm is triggered.
Caveats | The call was introduced in the MiNT version 0.8pl8 (!), but prior to the version 1.12 the code contained a bug that affected its functionality. The original description of this call in the Atari Compendium is wrong. Describing the Talarm() it in fact characterizes the Tmalarm() call.
Comments | If no SIGALRM signal handler has been set up when the alarm is triggered, the process will be killed. Since the Talarm() provides less precise time measurement, than Tmalarm(), and additionally is in fact only a wrapper function maintained for compatibility with older kernel versions, it is advisable to use Tmalarm() instead.
See Also | Tmalarm(), Pause(), Psignal()