public class NanoClock
Clock interface with nanosecond precision and no guarantee about its origin (that is, this is only suited for measuring relative/elapsed time).
| Modifier and Type | Class and Description |
|---|---|
static class |
NanoClock.Companion |
| Modifier and Type | Field and Description |
|---|---|
static NanoClock.Companion |
Companion |
| Constructor and Description |
|---|
NanoClock()
Clock interface with nanosecond precision and no guarantee about its origin (that is, this is only suited for
measuring relative/elapsed time).
|
| Modifier and Type | Method and Description |
|---|---|
double |
seconds()
Returns the number of seconds since an arbitrary (yet consistent) origin.
|
static NanoClock |
system()
Returns a
class NanoClock backed by System.nanoTime. |
public static NanoClock.Companion Companion
public NanoClock()
Clock interface with nanosecond precision and no guarantee about its origin (that is, this is only suited for measuring relative/elapsed time).
public double seconds()
Returns the number of seconds since an arbitrary (yet consistent) origin.
@JvmStatic @NotNull public static NanoClock system()
Returns a class NanoClock backed by System.nanoTime.
class NanoClock,
System.nanoTime