//core/io.islandtime.measures/Milliseconds
Milliseconds¶
common
value class Milliseconds(value: Long) : Comparable<Milliseconds>
Constructors¶
Milliseconds | common fun Milliseconds(value: Int) |
Types¶
Name | Summary |
---|---|
Companion | common object Companion |
Functions¶
Name | Summary |
---|---|
compareTo | common open operator override fun compareTo(other: Milliseconds): Int |
div | common operator fun div(scalar: Int): Milliseconds operator fun div(scalar: Long): Milliseconds Returns this duration divided by a scalar value. @throws ArithmeticException if overflow occurs or the scalar is zero |
minus | common operator fun minus(days: Days): Milliseconds operator fun minus(hours: Hours): Milliseconds operator fun minus(microseconds: Microseconds): Microseconds operator fun minus(milliseconds: Milliseconds): Milliseconds operator fun minus(minutes: Minutes): Milliseconds operator fun minus(nanoseconds: Nanoseconds): Nanoseconds operator fun minus(seconds: Seconds): Milliseconds |
plus | common operator fun plus(days: Days): Milliseconds operator fun plus(hours: Hours): Milliseconds operator fun plus(microseconds: Microseconds): Microseconds operator fun plus(milliseconds: Milliseconds): Milliseconds operator fun plus(minutes: Minutes): Milliseconds operator fun plus(nanoseconds: Nanoseconds): Nanoseconds operator fun plus(seconds: Seconds): Milliseconds |
rem | common operator fun rem(scalar: Int): Milliseconds operator fun rem(scalar: Long): Milliseconds Returns the remainder of this duration divided by a scalar value. |
times | common operator fun times(scalar: Int): Milliseconds operator fun times(scalar: Long): Milliseconds Multiplies this duration by a scalar value. @throws ArithmeticException if overflow occurs |
toComponents | common inline fun <T> toComponents(action: (seconds: Seconds, milliseconds: Milliseconds) -> T): T inline fun <T> toComponents(action: (minutes: Minutes, seconds: Seconds, milliseconds: Milliseconds) -> T): T inline fun <T> toComponents(action: (hours: Hours, minutes: Minutes, seconds: Seconds, milliseconds: Milliseconds) -> T): T inline fun <T> toComponents(action: (days: Days, hours: Hours, minutes: Minutes, seconds: Seconds, milliseconds: Milliseconds) -> T): T |
toComponentValues | common inline fun <T> toComponentValues(action: (seconds: Long, milliseconds: Int) -> T): T inline fun <T> toComponentValues(action: (minutes: Long, seconds: Int, milliseconds: Int) -> T): T inline fun <T> toComponentValues(action: (hours: Long, minutes: Int, seconds: Int, milliseconds: Int) -> T): T inline fun <T> toComponentValues(action: (days: Long, hours: Int, minutes: Int, seconds: Int, milliseconds: Int) -> T): T |
toDouble | common fun toDouble(): Double Converts this duration to a Double value. |
toInt | common fun toInt(): Int Converts this duration to an Int value. @throws ArithmeticException if overflow occurs |
toKotlinDuration | common fun toKotlinDuration(): Duration Converts this duration to a kotlin.time.Duration. |
toLong | common fun toLong(): Long Converts this duration to a Long value. |
toString | common open override fun toString(): String Converts this duration to an ISO-8601 time interval representation. |
unaryMinus | common operator fun unaryMinus(): Milliseconds Negates this duration. @throws ArithmeticException if overflow occurs |
Properties¶
Name | Summary |
---|---|
absoluteValue | common val absoluteValue: Milliseconds The absolute value of this duration. @throws ArithmeticException if overflow occurs |
inMicroseconds | common val inMicroseconds: Microseconds Converts this duration to microseconds. @throws ArithmeticException if overflow occurs |
inNanoseconds | common val inNanoseconds: Nanoseconds Converts this duration to nanoseconds. @throws ArithmeticException if overflow occurs |
inWholeDays | common val inWholeDays: Days Converts this duration to the number of whole days. |
inWholeHours | common val inWholeHours: Hours Converts this duration to the number of whole hours. |
inWholeMinutes | common val inWholeMinutes: Minutes Converts this duration to the number of whole minutes. |
inWholeSeconds | common val inWholeSeconds: Seconds Converts this duration to the number of whole seconds. |
value | common val value: Long The underlying value. |
Extensions¶
Name | Summary |
---|---|
asDuration | common fun Milliseconds.asDuration(): Duration |
toJavaDuration | jvm fun Milliseconds.toJavaDuration(): Duration Converts this duration to an equivalent Java Duration . |
toNSTimeInterval | darwin fun Milliseconds.toNSTimeInterval(): <ERROR CLASS> Converts this duration to an equivalent NSTimeInterval . |