public class Time extends Object
Clock. It instantiates an inner Clock with Clock.systemUTC(). Time is designed
to be used in production code.| Modifier | Constructor and Description |
|---|---|
protected |
Time() |
| Modifier and Type | Method and Description |
|---|---|
Clock |
clock()
Returns the clock.
|
static Time |
instance()
Returns the singleton instance of Time.
|
Instant |
now()
Returns the current instant using the clock.
|
protected void |
setClock(Clock clock) |
public static Time instance()
public Clock clock()
Clock.systemUTC().public Instant now()
protected void setClock(Clock clock)
Copyright © 2023. All rights reserved.