public class CpuCounter extends Object
Constructor and Description |
---|
CpuCounter() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Stops tracking CPU usage if that was the last instance.
|
long |
getCpuTime()
Returns amount of consumed CPU time since the JVM started, in nanoseconds.
|
double |
getCpuUsage()
Returns CPU usage since last call of this method, in fractions (from 0 to 1) of total CPU capacity.
|
public long getCpuTime()
public double getCpuUsage()
public void close()
Copyright © 2014 Devexperts. All Rights Reserved.