Make Duration storageUnit inline val to avoid state initialization

Avoid state initialization in JS and Native
This commit is contained in:
Ilya Gorbunov
2019-07-02 20:52:40 +03:00
parent f7fc5d2ffa
commit 7d14fb756d
+1 -1
View File
@@ -8,7 +8,7 @@ package kotlin.time
import kotlin.math.abs
@UseExperimental(ExperimentalTime::class)
private val storageUnit = DurationUnit.NANOSECONDS
private inline val storageUnit get() = DurationUnit.NANOSECONDS
/**
* Represents the amount of time one instant of time is away from another instant.