| Package | net.guttershark.util |
| Class | public final class CPU |
The CPU class does not provide details about how many CPU's they have, or he actual clock speed.
CPU.calculate(); trace(CPU.Speed); trace(CPU.Speed == CPU.FAST); trace(CPU.Speed == CPU.MEDIUM); trace(CPU.Speed == CPU.SLOW); trace(CPU.Benchmark);
See also
| Property | Defined by | ||
|---|---|---|---|
| Benchmark : Number [static]
The actual benchmark number.
| CPU | ||
| Speed : String [static]
The speed identifier.
| CPU | ||
| Method | Defined by | ||
|---|---|---|---|
|
calculate(maxForFast:int = 45, maxForMedium:int = 80):void
[static]
Calculate a benchmark time that gives a fairly accurate
number you can use to decide if the client's CPU is
fast / med / slow.
| CPU | ||
| Constant | Defined by | ||
|---|---|---|---|
| FAST : String = "fast" [static]
An Identifier for the Speed property of this class.
| CPU | ||
| MEDIUM : String = "medium" [static]
An Identifier for the Speed property of this class.
| CPU | ||
| SLOW : String = "slow" [static]
An Identifier for the Speed property of this class.
| CPU | ||
| Benchmark | property |
public static var Benchmark:NumberThe actual benchmark number.
| Speed | property |
public static var Speed:StringThe speed identifier. It will be set to one of CPU.FAST || CPU.MEDIUM || CPU.SLOW;
| calculate | () | method |
public static function calculate(maxForFast:int = 45, maxForMedium:int = 80):voidCalculate a benchmark time that gives a fairly accurate number you can use to decide if the client's CPU is fast / med / slow.
ParametersmaxForFast:int (default = 45) — The maximum benchmark that qualifies the client CPU as FAST.
|
|
maxForMedium:int (default = 80) — The maximum benchmark that qualifies the client CPU as MEDIUM.
|
| FAST | constant |
public static const FAST:String = "fast"An Identifier for the Speed property of this class.
| MEDIUM | constant |
public static const MEDIUM:String = "medium"An Identifier for the Speed property of this class.
| SLOW | constant |
public static const SLOW:String = "slow"An Identifier for the Speed property of this class.