Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8266846: Add java.time.InstantSource #4016

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/java.base/share/classes/java/time/InstantSource.java
Original file line number Diff line number Diff line change
@@ -217,7 +217,8 @@ static InstantSource offset(InstantSource baseSource, Duration offsetDuration) {
* an instant on the time-line rather than a raw millisecond value.
* This method is provided to allow the use of the source in high performance use cases
* where the creation of an object would be unacceptable.
* <p>
*
* @implSpec
* The default implementation calls {@link #instant()}.
*
* @return the current millisecond instant from this source, measured from
@@ -238,6 +239,11 @@ default long millis() {
* The returned implementation is immutable, thread-safe and {@code Serializable}
* providing that this source is.
*
* @implSpec
* The default implementation returns an immutable, thread-safe and
* {@code Serializable} subclass of {@link Clock} that combines this
* source and the specified zone.
*
* @param zone the time-zone to use, not null
* @return a clock based on this source with the specified time-zone, not null
*/