LONG Talarm( time )

LONG time;
Talarm() reads/sets a process alarm for the current process.
Opcode288 (0x0120)
AvailabilityThis function is available under all MiNT versions integrated with MultiTOS.
Parameterstime 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.
move.l	time,-(sp)
move.w	#$0120,-(sp)
trap	#1
addq.l	#6,sp
Return ValueTalarm() returns 0 if no alarm was scheduled prior to this call or the amount of time remaining (in seconds) before the alarm is triggered.
CaveatsThe 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.

CommentsIf 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(), it is advisable to use that last instead.

See Also Tmalarm(), Pause(), Psignal()