mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8266846: Add java.time.InstantSource
Reviewed-by: rriggs, naoto, darcy
This commit is contained in:
parent
7f55dc1576
commit
6c838c568c
6 changed files with 559 additions and 87 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -272,7 +272,7 @@ public final class Instant
|
|||
* @return the current instant using the system clock, not null
|
||||
*/
|
||||
public static Instant now() {
|
||||
return Clock.systemUTC().instant();
|
||||
return Clock.currentInstant();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue