public class ConstantMonitor extends Monitor
Modifier and Type | Field and Description |
---|---|
protected int |
totalCpuPercent |
cachedCPU, cachedPID, cacheTimeout, cpuDetectedAt, invalidMonitor, logger
Constructor and Description |
---|
ConstantMonitor() |
ConstantMonitor(int totalCpuPercent) |
Modifier and Type | Method and Description |
---|---|
protected long |
detectPID()
Returns the system CPU usage, in percents, between 0 and 100.
|
protected int |
detectTotalCpuPercent()
Returns the system CPU usage, in percents, between 0 and 100.
|
int |
getTotalCpuPercent()
Returns the system CPU usage, in percents, between 0 and 100.
|
void |
setTotalCpuPercent(int value) |
public ConstantMonitor()
public ConstantMonitor(int totalCpuPercent)
public int getTotalCpuPercent()
getTotalCpuPercent
in class Monitor
protected int detectTotalCpuPercent()
detectTotalCpuPercent
in class Monitor
protected long detectPID()
public void setTotalCpuPercent(int value)