public enum SystemTimeProvider extends Enum<SystemTimeProvider> implements TimeProvider
Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Field and Description |
---|---|
static TimeProvider |
CLOCK |
Modifier and Type | Method and Description |
---|---|
long |
currentTimeMicros() |
long |
currentTimeMillis() |
long |
currentTimeNanos() |
protected long |
currentTimeNanos1() |
static SystemTimeProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SystemTimeProvider[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
currentTime
public static final SystemTimeProvider INSTANCE
public static TimeProvider CLOCK
public static SystemTimeProvider[] values()
for (SystemTimeProvider c : SystemTimeProvider.values()) System.out.println(c);
public static SystemTimeProvider 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 long currentTimeMillis()
currentTimeMillis
in interface TimeProvider
public long currentTimeMicros()
currentTimeMicros
in interface TimeProvider
public long currentTimeNanos()
currentTimeNanos
in interface TimeProvider
protected long currentTimeNanos1()
Copyright © 2020. All rights reserved.