Added/Updated system.cpu /w docs

This commit is contained in:
Fredrik Høisæther Rasch
2015-09-22 12:08:54 +02:00
parent 8e868d9d52
commit d60a111f6c
+45
View File
@@ -6061,6 +6061,51 @@ declare module chrome.socket {
export function getNetworkList(callback: (result: NetworkInterface[]) => void): void;
}
////////////////////
// System CPU
////////////////////
/**
* Use the system.cpu API to query CPU metadata.
* Permissions: "system.cpu"
* @since Chrome 32.
*/
declare module chrome.system.cpu {
interface ProcessorUsage {
/** The cumulative time used by userspace programs on this processor. */
user: number;
/** The cumulative time used by kernel programs on this processor. */
kernel: number;
/** The cumulative time spent idle by this processor. */
idle: number;
/** The total cumulative time for this processor. This value is equal to user + kernel + idle. */
total: number;
}
interface ProcessorInfo {
/** Cumulative usage info for this logical processor. */
usage: ProcessorUsage;
}
interface CpuInfo {
/** The number of logical processors. */
numOfProcessors: number;
/** The architecture name of the processors. */
archName: string;
/** The model name of the processors. */
modelName: string;
/**
* A set of feature codes indicating some of the processor's capabilities.
* The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3", "sse4_1", "sse4_2", and "avx".
*/
features: string[];
/** Information about each logical processor. */
processors: ProcessorInfo[];
}
/** Queries basic CPU information of the system. */
export function getInfo(callback: (info: CpuInfo) => void): void;
}
////////////////////
// TabCapture
////////////////////