FixedClock

class FixedClock(instant: Instant, zone: TimeZone) : Clock

A clock with a fixed time, suitable for testing.

Parameters

instant

the initial instant that the clock should be set to

zone

the time zone

Constructors

FixedClock
Link copied to clipboard
common
fun FixedClock(instant: Instant, zone: TimeZone)
the initial instant that the clock should be set to

Functions

equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
minusAssign
Link copied to clipboard
common
operator fun minusAssign(days: IntDays)
operator fun minusAssign(hours: IntHours)
operator fun minusAssign(microseconds: IntMicroseconds)
operator fun minusAssign(milliseconds: IntMilliseconds)
operator fun minusAssign(minutes: IntMinutes)
operator fun minusAssign(nanoseconds: IntNanoseconds)
operator fun minusAssign(seconds: IntSeconds)
operator fun minusAssign(days: LongDays)
operator fun minusAssign(hours: LongHours)
operator fun minusAssign(microseconds: LongMicroseconds)
operator fun minusAssign(milliseconds: LongMilliseconds)
operator fun minusAssign(minutes: LongMinutes)
operator fun minusAssign(nanoseconds: LongNanoseconds)
operator fun minusAssign(seconds: LongSeconds)
plusAssign
Link copied to clipboard
common
operator fun plusAssign(days: IntDays)
operator fun plusAssign(hours: IntHours)
operator fun plusAssign(microseconds: IntMicroseconds)
operator fun plusAssign(milliseconds: IntMilliseconds)
operator fun plusAssign(minutes: IntMinutes)
operator fun plusAssign(nanoseconds: IntNanoseconds)
operator fun plusAssign(seconds: IntSeconds)
operator fun plusAssign(days: LongDays)
operator fun plusAssign(hours: LongHours)
operator fun plusAssign(microseconds: LongMicroseconds)
operator fun plusAssign(milliseconds: LongMilliseconds)
operator fun plusAssign(minutes: LongMinutes)
operator fun plusAssign(nanoseconds: LongNanoseconds)
operator fun plusAssign(seconds: LongSeconds)
readInstant
Link copied to clipboard
common
open override fun readInstant(): Instant
Reads the current Instant.
readMilliseconds
Link copied to clipboard
common
open override fun readMilliseconds(): LongMilliseconds
Reads the current number of milliseconds that have elapsed since the Unix epoch of 1970-01-01T00:00 in UTC.
readPlatformInstant
Link copied to clipboard
common
open override fun readPlatformInstant(): PlatformInstant
Reads the current PlatformInstant.
setTo
Link copied to clipboard
common
fun setTo(instant: Instant)
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

zone
Link copied to clipboard
common
open override val zone: TimeZone
the time zone