public final class Time extends Object
| Modifier and Type | Method and Description |
|---|---|
static Duration |
diffToNow(Instant other)
Gets the difference between
now and another instant. |
static Duration |
duration(TimeUnit unit,
long amount)
|
static Instant |
now()
Gets the current unix time as an
Instant. |
static long |
nowMillis()
Gets the current unix time in milliseconds.
|
static long |
nowSeconds()
Gets the current unix time in seconds.
|
public static long nowMillis()
public static long nowSeconds()
public static Instant now()
Instant.public static Duration diffToNow(Instant other)
now and another instant.other - the other instantCopyright © 2020. All rights reserved.