Important: The information in this document is obsolete and should not be used for new development.
PrimeTime
Use thePrimeTime
procedure to activate a task in the Time Manager queue.
PROCEDURE PrimeTime (tmTaskPtr: QElemPtr; count: LongInt);
tmTaskPtr
- A pointer to a task record already installed in the queue.
count
- The desired delay before execution of the task.
DESCRIPTION
ThePrimeTime
procedure schedules the task specified by thetmAddr
field oftmTaskPtr
for execution after the delay specified by thecount
parameter has elapsed.If the
count
parameter is a positive value, it is interpreted as milliseconds. Ifcount
is a negative value, it is interpreted in negated microseconds. (Microsecond delays are allowable only in the revised and extended Time Managers.)The task record specified by
tmTaskPtr
must already be installed in the queue (by a previous call toInsTime
orInsXTime
) before your application callsPrimeTime
.PrimeTime
returns immediately, and the specified task is executed after the specified delay has elapsed. If you callPrimeTime
with a time delay of 0, the task runs as soon as interrupts are enabled.In the revised and extended Time Managers,
PrimeTime
sets the high-order bit of theqType
field to 1. In addition, any value of thecount
parameter that exceeds the maximum millisecond delay is reduced to the maximum. If you stop an unexpired task (by callingRmvTime
) and then reinstall it (by callingInsXTime
), you can continue the previous delay by callingPrimeTime
with thecount
parameter set to 0.ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit forPrimeTime
are:Registers on entry
A0 Address of the task record D0 Specified delay time (long)Registers on exitD0 Result codeRESULT CODES
noErr 0 No error