Important: The information in this document is obsolete and should not be used for new development.
Summary of the Time Manager
Pascal Summary
Constants
CONST {Gestalt selector} gestaltTimeMgrVersion = 'tmgr'; {Time Manager version} {values returned by Gestalt} gestaltStandardTimeMgr = 1; {original Time Manager} gestaltRevisedTimeMgr = 2; {revised Time Manager} gestaltExtendedTimeMgr = 3; {extended Time Manager}Data Types
Original and Revised Time Manager Task Record
TYPE TMTask = RECORD qLink: QElemPtr; {next queue entry} qType: Integer; {queue type} tmAddr: ProcPtr; {pointer to task} tmCount: LongInt; {reserved} END;Extended Time Manager Task Record
TYPE TMTask = 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; TMTaskPtr = ^TMTask;Time Manager Routines
PROCEDURE InsTime (tmTaskPtr: QElemPtr); PROCEDURE InsXTime (tmTaskPtr: QElemPtr); PROCEDURE PrimeTime (tmTaskPtr: QElemPtr; count: LongInt); PROCEDURE RmvTime (tmTaskPtr: QElemPtr);Application-Defined Routine
PROCEDURE MyTimeTask;C Summary
Constants
/*Gestalt selector*/ #define gestaltTimeMgrVersion 'tmgr' /*Time Manager version*/ /*values returned by Gestalt*/ #define gestaltStandardTimeMgr 1 /*original Time Manager*/ #define gestaltRevisedTimeMgr 2 /*revised Time Manager*/ #define gestaltExtendedTimeMgr 3 /*extended Time Manager*/Data Types
typedef pascal void (*TimerProcPtr)(void);Original and Revised Time Manager Task Record
struct TMTask { QElemPtr qLink; /*next queue entry*/ short qType; /*queue type*/ TimerProcPtr tmAddr; /*pointer to task*/ long tmCount; /*reserved*/ };Extended Time Manager Task Record
struct TMTask { QElemPtr qLink; /*next queue entry*/ short qType; /*queue type*/ TimerProcPtr tmAddr; /*pointer to task*/ long tmCount; /*unused time*/ long tmWakeUp; /*wakeup time*/ long tmReserved; /*reserved for future use*/ }; typedef struct TMTask TMTask; typedef TMTask *TMTaskPtr;Time Manager Routines
pascal void InsTime(QElemPtr tmTaskPtr); pascal void InsXTime(QElemPtr tmTaskPtr); pascal void PrimeTime(QElemPtr tmTaskPtr, long count); pascal void RmvTime(QElemPtr tmTaskPtr);Application-Defined Routine
pascal void MyTimeTask(void);Assembly-Language Summary
Data Structures
Structure of Original and Revised Time Manager Queue Entry
0 qLink long pointer to next queue entry 4 qType word queue type 6 tmAddr long pointer to task 10 tmCount long unused time; returned to caller Structure of Extended Time Manager Queue Entry
0 qLink long pointer to next queue entry 4 qType word queue type 6 tmAddr long pointer to task 10 tmCount long unused time; returned to caller 14 tmWakeUp long wakeup time; used internally by the Time Manager 18 tmReserved long reserved for future use Result Codes
noErr 0 No error