|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jezhumble.javasysmon.CpuTimes
public class CpuTimes
This object represents a snapshot detailing the total time the CPUs have spent idle, in user mode, and in kernel mode.
Constructor Summary | |
---|---|
CpuTimes(long userMillis,
long systemMillis,
long idleMillis)
|
Method Summary | |
---|---|
float |
getCpuUsage(CpuTimes previous)
Gets the CPU usage given a previous snapshot of CPU times. |
long |
getIdleMillis()
The total time in milliseconds that the CPUs have spent idle. |
long |
getSystemMillis()
The total time in milliseconds that the CPUs have spent in kernel mode. |
long |
getTotalMillis()
The total time in milliseconds that the CPUs have been alive since the system was last booted. |
long |
getUserMillis()
The total time in milliseconds that the CPUs have spent in user mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CpuTimes(long userMillis, long systemMillis, long idleMillis)
Method Detail |
---|
public long getUserMillis()
public long getSystemMillis()
public long getIdleMillis()
public long getTotalMillis()
public float getCpuUsage(CpuTimes previous)
previous
- a CpuTimes snapshot taken previously.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |