timeUnitToDuration

fun timeUnitToDuration(value: Long, timeUnit: TimeUnit): Duration

Converts a Java TimeUnit value to a Kotlin Duration.

Return

the equivalent Duration

Parameters

value

the numeric value

timeUnit

the time unit of value