public final class NanoClock extends Clock implements Serializable
| Modifier and Type | Field and Description |
|---|---|
static long |
NANOS_PER_SECOND
This constants holds the number of nano seconds of one second.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
ZoneId |
getZone() |
int |
hashCode() |
Instant |
instant() |
long |
millis() |
long |
nanos()
This returns the nanosecond-based instant, measured from
1970-01-01T00:00Z (UTC).
|
static NanoClock |
system(ZoneId zone)
This clock is based on the nano system clock.
|
static NanoClock |
systemDefaultZone()
This clock is based on the nano system clock.
|
static NanoClock |
systemUTC()
This clock is based on the nano system clock.
|
String |
toString() |
NanoClock |
withZone(ZoneId zone) |
fixed, offset, tick, tickMinutes, tickSecondspublic static final long NANOS_PER_SECOND
public long nanos()
public static NanoClock system(ZoneId zone)
System.nanoTime() resolution
Conversion from instant to date or time uses the specified time-zone.
The returned implementation is immutable, thread-safe and
Serializable.
zone - the time-zone to use to convert the instant to date-timeNullPointerException - if the given zone is
nullpublic static NanoClock systemUTC()
System.nanoTime() resolution
Conversion from instant to date or time uses the specified time-zone.
The returned implementation is immutable, thread-safe and
Serializable.
NullPointerException - if the given zone is
nullpublic static NanoClock systemDefaultZone()
System.nanoTime() resolution
Conversion from instant to date or time uses the specified time-zone.
The returned implementation is immutable, thread-safe and
Serializable.
NullPointerException - if the given zone is
null© 2007-2017 Franz Wilhelmstötter (2017-04-28 16:50)