Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Processes
Chapter 3 - Time Manager / Time Manager Reference
Time Manager Routines /


PrimeTime

Use the PrimeTime 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
The PrimeTime procedure schedules the task specified by the tmAddr field of tmTaskPtr for execution after the delay specified by the count parameter has elapsed.

If the count parameter is a positive value, it is interpreted as milliseconds. If count 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 to InsTime or InsXTime) before your application calls PrimeTime. PrimeTime returns immediately, and the specified task is executed after the specified delay has elapsed. If you call PrimeTime 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 the qType field to 1. In addition, any value of the count parameter that exceeds the maximum millisecond delay is reduced to the maximum. If you stop an unexpired task (by calling RmvTime) and then reinstall it (by calling InsXTime), you can continue the previous delay by calling PrimeTime with the count parameter set to 0.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for PrimeTime are:

Registers on entry

A0	Address of the task record
D0	Specified delay time (long)
Registers on exit
D0	Result code

RESULT CODES
noErr	0	No error


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUN 1996