Class SystemCpuUsage
Definition
- Assembly:
- Tizen.System.Information.dll
The class for CPU usage information of the system.
C#Copypublic class SystemCpuUsage
- Inheritance
-
objectSystemCpuUsage
Constructors
SystemCpuUsage()
The constructor of SystemCpuUsage class. It internally call Update() on constructing an instance.
Declaration
C#Copypublic SystemCpuUsage()
Exceptions
| Type | Condition |
|---|---|
| System.IO.IOException | Thrown when an I/O error occurs while reading from the system. |
| System.NotSupportedException | Thrown when this system does not store the current CPU frequency. |
Properties
IoWait
Time waiting for I/O completion (Percent). To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic double IoWait { get; }
Property Value
| Type | Description |
|---|---|
| double |
Nice
Running time of niced user processes (Percent). To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic double Nice { get; }
Property Value
| Type | Description |
|---|---|
| double |
Declaration
C#Copypublic int ProcessorCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
System
Running time of kernel processes (Percent). To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic double System { get; }
Property Value
| Type | Description |
|---|---|
| double |
User
Running time of un-niced user processes (Percent). To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic double User { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
GetCurrentFrequency(int)
Gets the current frequency of the processor. To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic int GetCurrentFrequency(int coreId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | coreId | The index (from 0) of the CPU core that you want to know the frequency of. |
Returns
| Type | Description |
|---|---|
| int | The current frequency(MHz) of processor. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when the |
GetMaxFrequency(int)
Gets the max frequency of the processor. To get the latest value, it is recommended to call Update() before it.
Declaration
C#Copypublic int GetMaxFrequency(int coreId)
Parameters
| Type | Name | Description |
|---|---|---|
| int | coreId | The index (from 0) of CPU core that you want to know the frequency of. |
Returns
| Type | Description |
|---|---|
| int | The max frequency(MHz) of processor. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when the |
Declaration
C#Copypublic void Update()
Exceptions
| Type | Condition |
|---|---|
| System.IO.IOException | Thrown when an I/O error occurs while reading from the system. |
| System.NotSupportedException | Thrown when this system does not store the current CPU frequency. |