public enum Clock extends Enum<Clock>
Modifier and Type | Method and Description |
---|---|
abstract long |
fromMillisToClockGranularity(long millis)
Converts the provided milliseconds to the implementation specific clock granularity.
|
static Clock |
get()
Returns the currently configured clock instance.
|
abstract long |
getTime()
Returns the current timestamp.
|
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.
|
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 nameNullPointerException
- if the argument is nullpublic abstract long getTime()
public abstract long fromMillisToClockGranularity(long millis)
NANOS
clock, returns the provided milliseconds in nanoseconds.millis
- the duration to convertpublic static Clock get()
P6SpyOptions.getUseNanoTime()
Copyright © 2002-2016 P6Spy. All Rights Reserved.