Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileTmalarm()Pause()Psignal()Talarm() GEMDOSSyntaxLONG Talarm( time )
LONG time;
Function Talarm() reads/sets a process alarm for the current process.
Opcode 288 (0x0120)
Availability This function is available under all MiNTversions integrated
with MultiTOS.
Parametres 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.
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()