TimeUnit

expect enum TimeUnit : Enum<TimeUnit> (source)

时间单位,用于时间转化。

在 JVM 中会使用 java.util.concurrent.TimeUnit, 其他平台则会参照进行简单实现。

actual enum TimeUnit : Enum<TimeUnit> (source)

时间单位,用于时间转化。

时间单位,用于时间转化。

See also

actual enum TimeUnit : Enum<TimeUnit> (source)

时间单位,用于时间转化。

actual enum TimeUnit : Enum<TimeUnit> (source)

时间单位,用于时间转化。

Entries

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Inherited properties

name
Link copied to clipboard
ordinal
Link copied to clipboard

Functions

Link copied to clipboard
expect fun convert(sourceDuration: Long, sourceUnit: TimeUnit): Long

将以 sourceUnit 为单位的 sourceDuration 转化为当前单位的值

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

将以 sourceUnit 为单位的 sourceDuration 转化为当前单位的值

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

将以 sourceUnit 为单位的 sourceDuration 转化为当前单位的值

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

将以 sourceUnit 为单位的 sourceDuration 转化为当前单位的值

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

转为 Days

actual open fun toDays(duration: Long): Long

转为 Days

actual open fun toDays(duration: Long): Long

转为 Days

actual open fun toDays(duration: Long): Long

转为 Days

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

转为 Hours

actual open fun toHours(duration: Long): Long

转为 Hours

actual open fun toHours(duration: Long): Long

转为 Hours

actual open fun toHours(duration: Long): Long

转为 Hours

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

转为 Micros

actual open fun toMicros(duration: Long): Long

转为 Micros

actual open fun toMicros(duration: Long): Long

转为 Micros

actual open fun toMicros(duration: Long): Long

转为 Micros

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

转为 Millis

actual open fun toMillis(duration: Long): Long

转为 Millis

actual open fun toMillis(duration: Long): Long

转为 Millis

actual open fun toMillis(duration: Long): Long

转为 Millis

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

转为 Minutes

actual open fun toMinutes(duration: Long): Long

转为 Minutes

actual open fun toMinutes(duration: Long): Long

转为 Minutes

actual open fun toMinutes(duration: Long): Long

转为 Minutes

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

转为 Nanos

actual open fun toNanos(duration: Long): Long

转为 Nanos

actual open fun toNanos(duration: Long): Long

转为 Nanos

actual open fun toNanos(duration: Long): Long

转为 Nanos

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

转为 Seconds

actual open fun toSeconds(duration: Long): Long

转为 Seconds

actual open fun toSeconds(duration: Long): Long

转为 Seconds

actual open fun toSeconds(duration: Long): Long

转为 Seconds

Link copied to clipboard
fun valueOf(value: String): TimeUnit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

fun valueOf(value: String): TimeUnit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

fun valueOf(value: String): TimeUnit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

fun valueOf(value: String): TimeUnit

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Returns an array containing the constants of this enum type, in the order they're declared.

Returns an array containing the constants of this enum type, in the order they're declared.

Returns an array containing the constants of this enum type, in the order they're declared.