Make DurationUnit not a typealias of TimeUnit on JVM

Provide conversion functions between DurationUnit and TimeUnit
This commit is contained in:
Ilya Gorbunov
2021-09-28 02:02:29 +03:00
committed by Space
parent 2b1897e362
commit 04d70162d2
5 changed files with 119 additions and 18 deletions
@@ -19,6 +19,7 @@ import kotlin.time.DurationUnit.NANOSECONDS
class DurationUnitTest {
@Test
@OptIn(ExperimentalTime::class)
fun conversion() {
fun test(sourceValue: Double, sourceUnit: DurationUnit, targetValue: Double, targetUnit: DurationUnit) {
assertEquals(