struct MonotonicInstant
source · line 10public
public struct MonotonicInstant(val seconds: Long, val nanosecondAdjustment: Int) : Equals<MonotonicInstant>, Compare<MonotonicInstant>, Hash, Add<Duration, MonotonicInstant>, Sub<Duration, MonotonicInstant>
- Supertype
Equals<MonotonicInstant> - Supertype
Compare<MonotonicInstant> - Supertype
Hash - Supertype
Add<Duration, MonotonicInstant> - Supertype
Sub<Duration, MonotonicInstant>
A point on the system monotonic clock, expressed as seconds plus a signed nanosecond adjustment. Clock reads use a fraction in 0..999999999. Arithmetic and comparison normalize other adjustments and throw ArithmeticException if the resulting seconds are outside Long range.
function plus
source · line 34public
public override operator fun plus(other: Duration): MonotonicInstant
- Overrides
plus
parameter other
source · line 34public
other: Duration
function minus
source · line 40public
public operator fun minus(other: MonotonicInstant): Duration
parameter other
source · line 40public
other: MonotonicInstant
function hash
source · line 29public
public override fun hash(): Long
- Overrides
hash
field nanosecondAdjustment
source · line 10public
val nanosecondAdjustment: Int
function normalized
source · line 45public
public fun normalized(): MonotonicInstant
Returns the same instant with a fractional adjustment in 0..999999999.
field seconds
source · line 10public
val seconds: Long
constructor constructor
source · line 14public
constructor(reading: Duration)
Creates a timestamp from a normalized reading in the system monotonic clock domain.
parameter reading
source · line 14public
reading: Duration
function compareTo
source · line 21public
public override operator fun compareTo(other: MonotonicInstant): Long
- Overrides
compareTo
parameter other
source · line 21public
other: MonotonicInstant
function minus
source · line 37public
public override operator fun minus(other: Duration): MonotonicInstant
- Overrides
minus
parameter other
source · line 37public
other: Duration
function equals
source · line 19public
public override operator fun equals(other: MonotonicInstant): Boolean
- Overrides
equals
parameter other
source · line 19public
other: MonotonicInstant
constructor constructor
source · line 10public
constructor(val seconds: Long, val nanosecondAdjustment: Int)
parameter nanosecondAdjustment
source · line 10public
val nanosecondAdjustment: Int
parameter seconds
source · line 10public
val seconds: Long