GetCPUSpeed
You can use theGetCPUSpeedfunction to read the current CPU clock speed.
FUNCTION GetCPUSpeed: LongInt;DESCRIPTION
TheGetCPUSpeedfunction 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 theGetCPUSpeedroutine. That macro calls the_IdleStatetrap. To call the_IdleStatetrap directly, you must first put a longword routine selector in the D0 register. ForGetCPUSpeed, the routine selector can be any value that is less than 0. The CPU speed is returned as a single byte in register D0.
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help