MINUTES

Time unit representing sixty seconds.

Since

1.6

Properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard
fun convert(duration: Duration): Long

Converts the given time duration to this unit.

fun convert(sourceDuration: Long, sourceUnit: TimeUnit): Long

Converts the given time duration in the given unit to this unit. Conversions from finer to coarser granularities truncate, so lose precision. For example, converting 999 milliseconds to seconds results in 0. Conversions from coarser to finer granularities with arguments that would numerically overflow saturate to Long.MIN_VALUE if negative or Long.MAX_VALUE if positive.

Link copied to clipboard
fun toDays(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toHours(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toMicros(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toMillis(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toMinutes(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toNanos(duration: Long): Long

Equivalent to .convert.

Link copied to clipboard
fun toSeconds(duration: Long): Long

Equivalent to .convert.