Explicit public visibility, SinceKotlin and ExperimentalTime status
Use file level ExperimentalTime opt-in in tests.
This commit is contained in:
@@ -8,8 +8,12 @@
|
||||
|
||||
package kotlin.time
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalTime
|
||||
public actual typealias DurationUnit = java.util.concurrent.TimeUnit
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalTime
|
||||
internal actual fun convertDurationUnit(value: Double, sourceUnit: DurationUnit, targetUnit: DurationUnit): Double {
|
||||
val sourceInTargets = targetUnit.convert(1, sourceUnit)
|
||||
if (sourceInTargets > 0)
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
package kotlin.time
|
||||
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalTime
|
||||
public actual object MonoClock : AbstractLongClock(unit = DurationUnit.NANOSECONDS), Clock { // TODO: interface should not be required here
|
||||
override fun read(): Long = System.nanoTime()
|
||||
override fun toString(): String = "Clock(System.nanoTime())"
|
||||
|
||||
Reference in New Issue
Block a user