|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aicas.jamaica.lang.CpuTime
public class CpuTime
CpuTime provides access to the CPU timer, i.e., it permits the measurement of the CPU time spent by single threads in the system.
| Field Summary | |
|---|---|
static long |
CPU_RATE
CPU speed in cycles per millisecond. |
static boolean |
CPU_TIME_SUPPORTED
Flag that is true iff on the target system CPU usage monitoring is supported. |
| Constructor Summary | |
|---|---|
CpuTime()
|
|
| Method Summary | |
|---|---|
static void |
cycles2RelativeTime(long cycles,
RelativeTime relTime)
Convert a number of CPU cycles into a RelativeTime value. |
static long |
getAccurateCpuTime(Thread t)
get high resolution Java execution time of a given thread. |
static long |
getCpuTime(Thread t)
get high resolution Java execution time of a given thread. |
static long |
getRawCpuTime()
get raw high resolution time. |
static long |
getTotalCpuTime(Thread t)
get high resolution total execution time of given thread. |
static boolean |
isAccurate()
This functions returns true iff for the given system, accurate CPU cost monitoring is possible. |
static long |
relativeTime2Cycles(RelativeTime relTime)
Convert a positive relative time to a CPU cycles value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean CPU_TIME_SUPPORTED
public static final long CPU_RATE
| Constructor Detail |
|---|
public CpuTime()
| Method Detail |
|---|
public static boolean isAccurate()
public static long getAccurateCpuTime(Thread t)
t - the Java thread for which the execution time is to be
returned.
public static long getCpuTime(Thread t)
t - the Java thread for which the execution time is to be
returned.
public static long getTotalCpuTime(Thread t)
t - the Java thread for which the execution time is to be
returned.
public static long getRawCpuTime()
public static void cycles2RelativeTime(long cycles,
RelativeTime relTime)
cycles - number of CPU cycles, must be >= 0.relTime - (out!) will be set to the time interval that
corresponds to the given number of cycles.public static long relativeTime2Cycles(RelativeTime relTime)
relTime - a positive relative time, must not be null.
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||