Leave all deprecated duration API experimental KT-46784

This commit is contained in:
Ilya Gorbunov
2021-10-05 21:15:50 +03:00
committed by Space
parent 3d64c91375
commit 9c4a2d4431
3 changed files with 27 additions and 0 deletions
@@ -204,24 +204,31 @@ public abstract class AbstractLongTimeSource : kotlin.time.TimeSource {
public final inline class Duration : kotlin.Comparable<kotlin.time.Duration> {
public final val absoluteValue: kotlin.time.Duration { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeDays property instead or convert toDouble(DAYS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.DAYS)", imports = {}))
public final val inDays: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeHours property instead or convert toDouble(HOURS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.HOURS)", imports = {}))
public final val inHours: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMicroseconds property instead or convert toDouble(MICROSECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MICROSECONDS)", imports = {}))
public final val inMicroseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMilliseconds property instead or convert toDouble(MILLISECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MILLISECONDS)", imports = {}))
public final val inMilliseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMinutes property instead or convert toDouble(MINUTES) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MINUTES)", imports = {}))
public final val inMinutes: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeNanoseconds property instead or convert toDouble(NANOSECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.NANOSECONDS)", imports = {}))
public final val inNanoseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeSeconds property instead or convert toDouble(SECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.SECONDS)", imports = {}))
public final val inSeconds: kotlin.Double { get; }
@@ -283,9 +290,11 @@ public final inline class Duration : kotlin.Comparable<kotlin.time.Duration> {
public final fun toLong(unit: kotlin.time.DurationUnit): kotlin.Long
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMilliseconds property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.inWholeMilliseconds", imports = {}))
public final fun toLongMilliseconds(): kotlin.Long
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeNanoseconds property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.inWholeNanoseconds", imports = {}))
public final fun toLongNanoseconds(): kotlin.Long
+9
View File
@@ -204,24 +204,31 @@ public abstract class AbstractLongTimeSource : kotlin.time.TimeSource {
public final inline class Duration : kotlin.Comparable<kotlin.time.Duration> {
public final val absoluteValue: kotlin.time.Duration { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeDays property instead or convert toDouble(DAYS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.DAYS)", imports = {}))
public final val inDays: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeHours property instead or convert toDouble(HOURS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.HOURS)", imports = {}))
public final val inHours: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMicroseconds property instead or convert toDouble(MICROSECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MICROSECONDS)", imports = {}))
public final val inMicroseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMilliseconds property instead or convert toDouble(MILLISECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MILLISECONDS)", imports = {}))
public final val inMilliseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMinutes property instead or convert toDouble(MINUTES) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.MINUTES)", imports = {}))
public final val inMinutes: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeNanoseconds property instead or convert toDouble(NANOSECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.NANOSECONDS)", imports = {}))
public final val inNanoseconds: kotlin.Double { get; }
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeSeconds property instead or convert toDouble(SECONDS) if a double value is required.", replaceWith = kotlin.ReplaceWith(expression = "toDouble(DurationUnit.SECONDS)", imports = {}))
public final val inSeconds: kotlin.Double { get; }
@@ -283,9 +290,11 @@ public final inline class Duration : kotlin.Comparable<kotlin.time.Duration> {
public final fun toLong(unit: kotlin.time.DurationUnit): kotlin.Long
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeMilliseconds property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.inWholeMilliseconds", imports = {}))
public final fun toLongMilliseconds(): kotlin.Long
@kotlin.time.ExperimentalTime
@kotlin.Deprecated(message = "Use inWholeNanoseconds property instead.", replaceWith = kotlin.ReplaceWith(expression = "this.inWholeNanoseconds", imports = {}))
public final fun toLongNanoseconds(): kotlin.Long
@@ -760,30 +760,37 @@ public value class Duration internal constructor(private val rawValue: Long) : C
toLong(unit).coerceIn(Int.MIN_VALUE.toLong(), Int.MAX_VALUE.toLong()).toInt()
/** The value of this duration expressed as a [Double] number of days. */
@ExperimentalTime
@Deprecated("Use inWholeDays property instead or convert toDouble(DAYS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.DAYS)"))
public val inDays: Double get() = toDouble(DurationUnit.DAYS)
/** The value of this duration expressed as a [Double] number of hours. */
@ExperimentalTime
@Deprecated("Use inWholeHours property instead or convert toDouble(HOURS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.HOURS)"))
public val inHours: Double get() = toDouble(DurationUnit.HOURS)
/** The value of this duration expressed as a [Double] number of minutes. */
@ExperimentalTime
@Deprecated("Use inWholeMinutes property instead or convert toDouble(MINUTES) if a double value is required.", ReplaceWith("toDouble(DurationUnit.MINUTES)"))
public val inMinutes: Double get() = toDouble(DurationUnit.MINUTES)
/** The value of this duration expressed as a [Double] number of seconds. */
@ExperimentalTime
@Deprecated("Use inWholeSeconds property instead or convert toDouble(SECONDS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.SECONDS)"))
public val inSeconds: Double get() = toDouble(DurationUnit.SECONDS)
/** The value of this duration expressed as a [Double] number of milliseconds. */
@ExperimentalTime
@Deprecated("Use inWholeMilliseconds property instead or convert toDouble(MILLISECONDS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.MILLISECONDS)"))
public val inMilliseconds: Double get() = toDouble(DurationUnit.MILLISECONDS)
/** The value of this duration expressed as a [Double] number of microseconds. */
@ExperimentalTime
@Deprecated("Use inWholeMicroseconds property instead or convert toDouble(MICROSECONDS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.MICROSECONDS)"))
public val inMicroseconds: Double get() = toDouble(DurationUnit.MICROSECONDS)
/** The value of this duration expressed as a [Double] number of nanoseconds. */
@ExperimentalTime
@Deprecated("Use inWholeNanoseconds property instead or convert toDouble(NANOSECONDS) if a double value is required.", ReplaceWith("toDouble(DurationUnit.NANOSECONDS)"))
public val inNanoseconds: Double get() = toDouble(DurationUnit.NANOSECONDS)
@@ -871,6 +878,7 @@ public value class Duration internal constructor(private val rawValue: Long) : C
*
* The range of durations that can be expressed as a `Long` number of nanoseconds is approximately ±292 years.
*/
@ExperimentalTime
@Deprecated("Use inWholeNanoseconds property instead.", ReplaceWith("this.inWholeNanoseconds"))
public fun toLongNanoseconds(): Long = inWholeNanoseconds
@@ -881,6 +889,7 @@ public value class Duration internal constructor(private val rawValue: Long) : C
*
* The range of durations that can be expressed as a `Long` number of milliseconds is approximately ±292 million years.
*/
@ExperimentalTime
@Deprecated("Use inWholeMilliseconds property instead.", ReplaceWith("this.inWholeMilliseconds"))
public fun toLongMilliseconds(): Long = inWholeMilliseconds