Make Duration storageUnit inline val to avoid state initialization
Avoid state initialization in JS and Native
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user