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: Devices /
Chapter 6 - Power Manager / Power Manager Reference
Power Manager Routines / Controlling the Idle State


GetCPUSpeed

You can use the GetCPUSpeed function to read the current CPU clock speed.

FUNCTION GetCPUSpeed: LongInt;
DESCRIPTION
The GetCPUSpeed function returns the current effective clock speed (in megahertz) of the CPU.

ASSEMBLY-LANGUAGE INFORMATION
The MPW development system provides an assembly-language macro to execute the GetCPUSpeed routine. That macro calls the _IdleState trap. To call the _IdleState trap directly, you must first put a longword routine selector in the D0 register. For GetCPUSpeed, the routine selector can be any value that is less than 0. The CPU speed is returned as a single byte in register D0.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
3 JUL 1996