|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Clock>
com.carrotsearch.junitbenchmarks.Clock
public enum Clock
Used to specify what time to measure in BenchmarkOptions.
| Enum Constant Summary | |
|---|---|
CPU_TIME
Invokes ThreadMXBean.getCurrentThreadCpuTime() |
|
NANO_TIME
Invokes System.nanoTime() |
|
REAL_TIME
Invokes System.currentTimeMillis() |
|
USER_TIME
Invokes ThreadMXBean.getCurrentThreadUserTime() |
|
| Method Summary | |
|---|---|
static Clock |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static Clock[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Clock REAL_TIME
System.currentTimeMillis()
public static final Clock NANO_TIME
System.nanoTime()
public static final Clock CPU_TIME
ThreadMXBean.getCurrentThreadCpuTime()
public static final Clock USER_TIME
ThreadMXBean.getCurrentThreadUserTime()
| Method Detail |
|---|
public static Clock[] values()
for (Clock c : Clock.values()) System.out.println(c);
public static Clock valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||