ProjectBLL/CpuUsage.cs
/// <summary> 
/// Determines the current average CPU load. 
/// </summary> 
/// <returns>An integer that holds the CPU load percentage.</returns> 
/// <exception cref="NotSupportedException">One of the system calls fails. The CPU time can not be obtained.</exception> 
Determines the current average CPU load.
Determines the current average CPU load .
public override int Query()
        {
            try
            {
                return (int)m_StatData.GetValue(@"KERNEL\CPUUsage");
            }
            catch (Exception e)
            {
                throw new NotSupportedException("Error while querying the system information.", e);
            }
        }
public override int Query ( ) { try { return ( int ) m_StatData . GetValue ( @"KERNEL\CPUUsage" ) ; } catch ( Exception e ) { throw new NotSupportedException ( " " , e ) ; } }
Determines the current average CPU load.
Determines the current average CPU load .
An integer that holds the CPU load percentage.
An integer that holds the CPU load percentage .
One of the system calls fails. The CPU time can not be obtained.
One of the system calls fails . The CPU time can not be obtained .