Clock

abstract class Clock extends Clock

Extension on Java's Clock that exposes additional APIs to work with nanoTime values.

Companion:
object
class Clock
class Object
trait Matchable
class Any
class Anchored

Value members

Abstract methods

def nanos(): Long

Returns the current value of the high-resolution time source, in nanoseconds.

Returns the current value of the high-resolution time source, in nanoseconds.

def nanosSince(instant: Instant): Long

Returns the difference in nanoseconds between the current instant and the provided one.

Returns the difference in nanoseconds between the current instant and the provided one.

def toInstant(nanos: Long): Instant

Creates a new Instant from the provided high-resolution time source value.

Creates a new Instant from the provided high-resolution time source value.

Inherited methods

def equals(x$0: <FromJavaObject>): Boolean
Inherited from:
Clock
def getZone(): ZoneId
Inherited from:
Clock
def hashCode(): Int
Inherited from:
Clock
def instant(): Instant
Inherited from:
Clock
def millis(): Long
Inherited from:
Clock
def withZone(x$0: ZoneId): Clock
Inherited from:
Clock