IntSeconds

inline class IntSeconds(value: Int) : Comparable<IntSeconds>

A number of seconds.

Constructors

IntSeconds
Link copied to clipboard
common
fun IntSeconds(value: Int)

Types

Companion
Link copied to clipboard
common
object Companion

Functions

compareTo
Link copied to clipboard
common
open operator override fun compareTo(other: IntSeconds): Int
div
Link copied to clipboard
common
operator fun div(scalar: Int): IntSeconds
Divides this duration by a scalar value.
operator fun div(scalar: Long): LongSeconds
Divides this duration by a scalar value.
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
isNegative
Link copied to clipboard
common
fun isNegative(): Boolean
Checks if this duration is negative.
isPositive
Link copied to clipboard
common
fun isPositive(): Boolean
Checks if this duration is positive.
isZero
Link copied to clipboard
common
fun isZero(): Boolean
Checks if this duration is zero.
minus
Link copied to clipboard
common
operator fun minus(days: IntDays): IntSeconds
operator fun minus(hours: IntHours): IntSeconds
operator fun minus(microseconds: IntMicroseconds): LongMicroseconds
operator fun minus(milliseconds: IntMilliseconds): LongMilliseconds
operator fun minus(minutes: IntMinutes): IntSeconds
operator fun minus(nanoseconds: IntNanoseconds): LongNanoseconds
operator fun minus(seconds: IntSeconds): IntSeconds
operator fun minus(days: LongDays): LongSeconds
operator fun minus(hours: LongHours): LongSeconds
operator fun minus(microseconds: LongMicroseconds): LongMicroseconds
operator fun minus(milliseconds: LongMilliseconds): LongMilliseconds
operator fun minus(minutes: LongMinutes): LongSeconds
operator fun minus(nanoseconds: LongNanoseconds): LongNanoseconds
operator fun minus(seconds: LongSeconds): LongSeconds
plus
Link copied to clipboard
common
operator fun plus(days: IntDays): IntSeconds
operator fun plus(hours: IntHours): IntSeconds
operator fun plus(microseconds: IntMicroseconds): LongMicroseconds
operator fun plus(milliseconds: IntMilliseconds): LongMilliseconds
operator fun plus(minutes: IntMinutes): IntSeconds
operator fun plus(nanoseconds: IntNanoseconds): LongNanoseconds
operator fun plus(seconds: IntSeconds): IntSeconds
operator fun plus(days: LongDays): LongSeconds
operator fun plus(hours: LongHours): LongSeconds
operator fun plus(microseconds: LongMicroseconds): LongMicroseconds
operator fun plus(milliseconds: LongMilliseconds): LongMilliseconds
operator fun plus(minutes: LongMinutes): LongSeconds
operator fun plus(nanoseconds: LongNanoseconds): LongNanoseconds
operator fun plus(seconds: LongSeconds): LongSeconds
rem
Link copied to clipboard
common
operator fun rem(scalar: Int): IntSeconds
operator fun rem(scalar: Long): LongSeconds
times
Link copied to clipboard
common
operator fun times(scalar: Int): IntSeconds
Multiplies this duration by a scalar value.
operator fun times(scalar: Long): LongSeconds
Multiplies this duration by a scalar value.
toComponents
Link copied to clipboard
common
inline fun <T> toComponents(action: (minutes: IntMinutes, seconds: IntSeconds) -> T): T
inline fun <T> toComponents(action: (hours: IntHours, minutes: IntMinutes, seconds: IntSeconds) -> T): T
inline fun <T> toComponents(action: (days: IntDays, hours: IntHours, minutes: IntMinutes, seconds: IntSeconds) -> T): T
toKotlinDuration
Link copied to clipboard
common
fun toKotlinDuration(): Duration
Converts this duration to a kotlin.time.Duration.
toLong
Link copied to clipboard
common
fun toLong(): Long
Converts this duration to a Long value.
toLongSeconds
Link copied to clipboard
common
fun toLongSeconds(): LongSeconds
Converts this duration to LongSeconds.
toString
Link copied to clipboard
common
open override fun toString(): String
Converts this duration to an ISO-8601 time interval representation.
unaryMinus
Link copied to clipboard
common
operator fun unaryMinus(): IntSeconds
Negates this duration.

Properties

absoluteValue
Link copied to clipboard
common
val absoluteValue: IntSeconds
The absolute value of this duration.
inDays
Link copied to clipboard
common
val inDays: IntDays
Converts this duration to the number of whole days.
inHours
Link copied to clipboard
common
val inHours: IntHours
Converts this duration to the number of whole hours.
inMicroseconds
Link copied to clipboard
common
val inMicroseconds: LongMicroseconds
Converts this duration to microseconds.
inMilliseconds
Link copied to clipboard
common
val inMilliseconds: LongMilliseconds
Converts this duration to milliseconds.
inMinutes
Link copied to clipboard
common
val inMinutes: IntMinutes
Converts this duration to the number of whole minutes.
inNanoseconds
Link copied to clipboard
common
val inNanoseconds: LongNanoseconds
Converts this duration to nanoseconds.
value
Link copied to clipboard
common
val value: Int
The underlying value.

Extensions

asDuration
Link copied to clipboard
common
fun IntSeconds.asDuration(): Duration
asUtcOffset
Link copied to clipboard
common
fun IntSeconds.asUtcOffset(): UtcOffset
Converts a duration of seconds into a UtcOffset of the same length.
toJavaDuration
Link copied to clipboard
fun IntSeconds.toJavaDuration(): Duration
Converts this duration to an equivalent Java Duration.
toNSTimeInterval
Link copied to clipboard
darwin
fun IntSeconds.toNSTimeInterval(): <ERROR CLASS>
Converts this duration to an equivalent NSTimeInterval.