Important: The information in this document is obsolete and should not be used for new development.
Data Structures
All Time Manager routines require that you pass the address of a Time Manager task record, defined by theTMTask
data type. If you are using the original or revised Time Manager, the task record has this structure:
TYPE TMTask = {original and revised Time Manager task record} RECORD qLink: QElemPtr; {next queue entry} qType: Integer; {queue type} tmAddr: ProcPtr; {pointer to task} tmCount: LongInt; {reserved} END;If you are using the extended Time Manager, the task record has this structure:
Field Description
qLink
- A pointer to the next element in the Time Manager queue. This field is used internally by the Time Manager.
qType
- The type of queue. The Time Manager automatically sets this field to the appropriate value. In the revised Time Manager, the high-order bit of this field is a flag that indicates whether the task is active.
tmAddr
- A pointer to the routine to be executed after the delay specified in a call to
PrimeTime
.tmCount
- Reserved in the original Time Manager. In the revised Time Manager, the amount of time remaining until the task's scheduled execution time; this field is valid only after you call
RmvTime
with a task that has not yet executed.
TYPE TMTask = {extended Time Manager task record} RECORD qLink: QElemPtr; {next queue entry} qType: Integer; {queue type} tmAddr: ProcPtr; {pointer to task} tmCount: LongInt; {unused time} tmWakeUp: LongInt; {wakeup time} tmReserved: LongInt; {reserved for future use} END;
Field Description
qLink
- A pointer to the next element in the Time Manager queue. This field is used internally by the Time Manager.
qType
- The type of queue. The Time Manager automatically sets this field to the appropriate value. The high-order bit of this field is a flag that indicates whether the task is active.
tmAddr
- A pointer to the routine that is to be executed after the delay specified in a call to
PrimeTime
.tmCount
- The time remaining until the task's scheduled execution time. This field is valid only after you call
RmvTime
with a task that has not yet executed.tmWakeUp
- The time when the task specified in the
tmAddr
field was last executed. This field is used internally by the Time Manager. You should set it to 0 when you first install a task record.tmReserved
- Reserved.
© Apple Computer, Inc.
17 JUN 1996