LONG Talarm( time )
|Talarm() reads/sets a process alarm for the current process.|
|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.|
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(), it is advisable to use that last instead.
|See Also||Tmalarm(), Pause(), Psignal()|