Package | Description |
---|---|
javax.time |
Provides classes to manage the continuous time scale including a wrapper
for the system clock.
|
javax.time.calendar |
Provides classes to manage the human time scale including date, time,
date-time and time-zone representations.
|
Modifier and Type | Method and Description |
---|---|
static TimeSource |
TimeSource.fixed(InstantProvider fixedInstantProvider)
Gets a time-source that always returns the same
Instant . |
static TimeSource |
TimeSource.offsetSystem(Duration offset)
Gets a time-source that obtains the current instant using the system
millisecond clock and adjusts by a fixed offset.
|
static TimeSource |
TimeSource.system()
Gets a time-source that obtains the current instant using
the system millisecond clock.
|
Modifier and Type | Method and Description |
---|---|
static Instant |
Instant.now(TimeSource timeSource)
Obtains the current instant from the specified clock.
|
Modifier and Type | Method and Description |
---|---|
TimeSource |
Clock.getSource()
Gets the time-source being used to create dates and times.
|
Modifier and Type | Method and Description |
---|---|
static Clock |
Clock.clock(TimeSource timeSource,
TimeZone timeZone)
Gets a clock that obtains the current date and time using the specified
time-source and time-zone.
|
static Clock |
Clock.clockDefaultZone(TimeSource timeSource)
Gets a clock that obtains the current date and time using the specified
time-source and default time-zone.
|
Clock |
Clock.withSource(TimeSource timeSource)
Returns a copy of this clock with a different time-source.
|
Copyright © 2014. All rights reserved.