Example usage for Java java.time Clock fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | equals(Object obj) Checks if this clock is equal to another clock. |
Clock | fixed(Instant fixedInstant, ZoneId zone) Obtains a clock that always returns the same instant. |
ZoneId | getZone() Gets the time-zone being used to create dates and times. |
int | hashCode() A hash code for this clock. |
Instant | instant() Gets the current instant of the clock. |
long | millis() Gets the current millisecond instant of the clock. |
Clock | offset(Clock baseClock, Duration offsetDuration) Obtains a clock that returns instants from the specified clock with the specified duration added This clock wraps another clock, returning instants that are later by the specified duration. |
Clock | system(ZoneId zone) Obtains a clock that returns the current instant using the best available system clock. |
Clock | systemDefaultZone() Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the default time-zone. |
Clock | systemUTC() Obtains a clock that returns the current instant using the best available system clock, converting to date and time using the UTC time-zone. |
Clock | tick(Clock baseClock, Duration tickDuration) Obtains a clock that returns instants from the specified clock truncated to the nearest occurrence of the specified duration. |
Clock | tickMinutes(ZoneId zone) Obtains a clock that returns the current instant ticking in whole minutes using the best available system clock. |
Clock | tickSeconds(ZoneId zone) Obtains a clock that returns the current instant ticking in whole seconds using the best available system clock. |
Clock | withZone(ZoneId zone) Returns a copy of this clock with a different time-zone. |