ADD week 5
This commit is contained in:
117
02-Easy5/E5/sources/kotlin/time/AbstractDoubleTimeSource.java
Normal file
117
02-Easy5/E5/sources/kotlin/time/AbstractDoubleTimeSource.java
Normal file
@ -0,0 +1,117 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.ComparableTimeMark;
|
||||
import kotlin.time.TimeSource;
|
||||
|
||||
/* compiled from: TimeSources.kt */
|
||||
@Deprecated(message = "Using AbstractDoubleTimeSource is no longer recommended, use AbstractLongTimeSource instead.")
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0002\b'\u0018\u00002\u00020\u0001:\u0001\u000bB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\u0007\u001a\u00020\bH\u0016J\b\u0010\t\u001a\u00020\nH$R\u0014\u0010\u0002\u001a\u00020\u0003X\u0084\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\f"}, d2 = {"Lkotlin/time/AbstractDoubleTimeSource;", "Lkotlin/time/TimeSource$WithComparableMarks;", "unit", "Lkotlin/time/DurationUnit;", "(Lkotlin/time/DurationUnit;)V", "getUnit", "()Lkotlin/time/DurationUnit;", "markNow", "Lkotlin/time/ComparableTimeMark;", "read", "", "DoubleTimeMark", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class AbstractDoubleTimeSource implements TimeSource.WithComparableMarks {
|
||||
private final DurationUnit unit;
|
||||
|
||||
protected final DurationUnit getUnit() {
|
||||
return this.unit;
|
||||
}
|
||||
|
||||
protected abstract double read();
|
||||
|
||||
public AbstractDoubleTimeSource(DurationUnit unit) {
|
||||
Intrinsics.checkNotNullParameter(unit, "unit");
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
/* compiled from: TimeSources.kt */
|
||||
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0006\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u000e\n\u0000\b\u0002\u0018\u00002\u00020\u0001B \u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007ø\u0001\u0000¢\u0006\u0002\u0010\bJ\u0015\u0010\n\u001a\u00020\u0007H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u000b\u0010\fJ\u0013\u0010\r\u001a\u00020\u000e2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0010H\u0096\u0002J\b\u0010\u0011\u001a\u00020\u0012H\u0016J\u001e\u0010\u0013\u001a\u00020\u00072\u0006\u0010\u000f\u001a\u00020\u0001H\u0096\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u0014\u0010\u0015J\u001b\u0010\u0016\u001a\u00020\u00012\u0006\u0010\u0017\u001a\u00020\u0007H\u0096\u0002ø\u0001\u0000¢\u0006\u0004\b\u0018\u0010\u0019J\b\u0010\u001a\u001a\u00020\u001bH\u0016R\u0016\u0010\u0006\u001a\u00020\u0007X\u0082\u0004ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\n\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u001c"}, d2 = {"Lkotlin/time/AbstractDoubleTimeSource$DoubleTimeMark;", "Lkotlin/time/ComparableTimeMark;", "startedAt", "", "timeSource", "Lkotlin/time/AbstractDoubleTimeSource;", TypedValues.CycleType.S_WAVE_OFFSET, "Lkotlin/time/Duration;", "(DLkotlin/time/AbstractDoubleTimeSource;JLkotlin/jvm/internal/DefaultConstructorMarker;)V", "J", "elapsedNow", "elapsedNow-UwyO8pc", "()J", "equals", "", "other", "", "hashCode", "", "minus", "minus-UwyO8pc", "(Lkotlin/time/ComparableTimeMark;)J", "plus", TypedValues.TransitionType.S_DURATION, "plus-LRDsOJo", "(J)Lkotlin/time/ComparableTimeMark;", "toString", "", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
private static final class DoubleTimeMark implements ComparableTimeMark {
|
||||
private final long offset;
|
||||
private final double startedAt;
|
||||
private final AbstractDoubleTimeSource timeSource;
|
||||
|
||||
public /* synthetic */ DoubleTimeMark(double d, AbstractDoubleTimeSource abstractDoubleTimeSource, long j, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(d, abstractDoubleTimeSource, j);
|
||||
}
|
||||
|
||||
private DoubleTimeMark(double d, AbstractDoubleTimeSource timeSource, long j) {
|
||||
Intrinsics.checkNotNullParameter(timeSource, "timeSource");
|
||||
this.startedAt = d;
|
||||
this.timeSource = timeSource;
|
||||
this.offset = j;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(ComparableTimeMark comparableTimeMark) {
|
||||
return ComparableTimeMark.DefaultImpls.compareTo(this, comparableTimeMark);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasNotPassedNow() {
|
||||
return ComparableTimeMark.DefaultImpls.hasNotPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasPassedNow() {
|
||||
return ComparableTimeMark.DefaultImpls.hasPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo, reason: not valid java name */
|
||||
public ComparableTimeMark mo1665minusLRDsOJo(long j) {
|
||||
return ComparableTimeMark.DefaultImpls.m1670minusLRDsOJo(this, j);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: elapsedNow-UwyO8pc, reason: not valid java name */
|
||||
public long mo1664elapsedNowUwyO8pc() {
|
||||
return Duration.m1710minusLRDsOJo(DurationKt.toDuration(this.timeSource.read() - this.startedAt, this.timeSource.getUnit()), this.offset);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo, reason: not valid java name */
|
||||
public ComparableTimeMark mo1667plusLRDsOJo(long duration) {
|
||||
return new DoubleTimeMark(this.startedAt, this.timeSource, Duration.m1711plusLRDsOJo(this.offset, duration), null);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
/* renamed from: minus-UwyO8pc, reason: not valid java name */
|
||||
public long mo1666minusUwyO8pc(ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
if (other instanceof DoubleTimeMark) {
|
||||
DoubleTimeMark doubleTimeMark = (DoubleTimeMark) other;
|
||||
if (Intrinsics.areEqual(this.timeSource, doubleTimeMark.timeSource)) {
|
||||
if (Duration.m1680equalsimpl0(this.offset, doubleTimeMark.offset) && Duration.m1707isInfiniteimpl(this.offset)) {
|
||||
return Duration.INSTANCE.m1777getZEROUwyO8pc();
|
||||
}
|
||||
long m1710minusLRDsOJo = Duration.m1710minusLRDsOJo(this.offset, doubleTimeMark.offset);
|
||||
long duration = DurationKt.toDuration(this.startedAt - doubleTimeMark.startedAt, this.timeSource.getUnit());
|
||||
return Duration.m1680equalsimpl0(duration, Duration.m1727unaryMinusUwyO8pc(m1710minusLRDsOJo)) ? Duration.INSTANCE.m1777getZEROUwyO8pc() : Duration.m1711plusLRDsOJo(duration, m1710minusLRDsOJo);
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Subtracting or comparing time marks from different time sources is not possible: " + this + " and " + other);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public boolean equals(Object other) {
|
||||
return (other instanceof DoubleTimeMark) && Intrinsics.areEqual(this.timeSource, ((DoubleTimeMark) other).timeSource) && Duration.m1680equalsimpl0(mo1666minusUwyO8pc((ComparableTimeMark) other), Duration.INSTANCE.m1777getZEROUwyO8pc());
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public int hashCode() {
|
||||
return Duration.m1703hashCodeimpl(Duration.m1711plusLRDsOJo(DurationKt.toDuration(this.startedAt, this.timeSource.getUnit()), this.offset));
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "DoubleTimeMark(" + this.startedAt + DurationUnitKt.shortName(this.timeSource.getUnit()) + " + " + ((Object) Duration.m1724toStringimpl(this.offset)) + ", " + this.timeSource + ')';
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource
|
||||
public ComparableTimeMark markNow() {
|
||||
return new DoubleTimeMark(read(), this, Duration.INSTANCE.m1777getZEROUwyO8pc(), null);
|
||||
}
|
||||
}
|
143
02-Easy5/E5/sources/kotlin/time/AbstractLongTimeSource.java
Normal file
143
02-Easy5/E5/sources/kotlin/time/AbstractLongTimeSource.java
Normal file
@ -0,0 +1,143 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.ComparableTimeMark;
|
||||
import kotlin.time.Duration;
|
||||
import kotlin.time.TimeSource;
|
||||
|
||||
/* compiled from: TimeSources.kt */
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\b'\u0018\u00002\u00020\u0001:\u0001\u000bB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\u0007\u001a\u00020\bH\u0016J\b\u0010\t\u001a\u00020\nH$R\u0014\u0010\u0002\u001a\u00020\u0003X\u0084\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\f"}, d2 = {"Lkotlin/time/AbstractLongTimeSource;", "Lkotlin/time/TimeSource$WithComparableMarks;", "unit", "Lkotlin/time/DurationUnit;", "(Lkotlin/time/DurationUnit;)V", "getUnit", "()Lkotlin/time/DurationUnit;", "markNow", "Lkotlin/time/ComparableTimeMark;", "read", "", "LongTimeMark", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class AbstractLongTimeSource implements TimeSource.WithComparableMarks {
|
||||
private final DurationUnit unit;
|
||||
|
||||
protected final DurationUnit getUnit() {
|
||||
return this.unit;
|
||||
}
|
||||
|
||||
protected abstract long read();
|
||||
|
||||
public AbstractLongTimeSource(DurationUnit unit) {
|
||||
Intrinsics.checkNotNullParameter(unit, "unit");
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
/* compiled from: TimeSources.kt */
|
||||
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u000e\n\u0000\b\u0002\u0018\u00002\u00020\u0001B \u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007ø\u0001\u0000¢\u0006\u0002\u0010\bJ\u0015\u0010\n\u001a\u00020\u0007H\u0000ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u000b\u0010\fJ\u0015\u0010\r\u001a\u00020\u0007H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u000e\u0010\fJ\u0013\u0010\u000f\u001a\u00020\u00102\b\u0010\u0011\u001a\u0004\u0018\u00010\u0012H\u0096\u0002J\b\u0010\u0013\u001a\u00020\u0014H\u0016J\u001e\u0010\u0015\u001a\u00020\u00072\u0006\u0010\u0011\u001a\u00020\u0001H\u0096\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u0016\u0010\u0017J\u001b\u0010\u0018\u001a\u00020\u00012\u0006\u0010\u0019\u001a\u00020\u0007H\u0096\u0002ø\u0001\u0000¢\u0006\u0004\b\u001a\u0010\u001bJ\b\u0010\u001c\u001a\u00020\u001dH\u0016R\u0016\u0010\u0006\u001a\u00020\u0007X\u0082\u0004ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\n\u0002\u0010\tR\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0004\u001a\u00020\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u001e"}, d2 = {"Lkotlin/time/AbstractLongTimeSource$LongTimeMark;", "Lkotlin/time/ComparableTimeMark;", "startedAt", "", "timeSource", "Lkotlin/time/AbstractLongTimeSource;", TypedValues.CycleType.S_WAVE_OFFSET, "Lkotlin/time/Duration;", "(JLkotlin/time/AbstractLongTimeSource;JLkotlin/jvm/internal/DefaultConstructorMarker;)V", "J", "effectiveDuration", "effectiveDuration-UwyO8pc$kotlin_stdlib", "()J", "elapsedNow", "elapsedNow-UwyO8pc", "equals", "", "other", "", "hashCode", "", "minus", "minus-UwyO8pc", "(Lkotlin/time/ComparableTimeMark;)J", "plus", TypedValues.TransitionType.S_DURATION, "plus-LRDsOJo", "(J)Lkotlin/time/ComparableTimeMark;", "toString", "", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
private static final class LongTimeMark implements ComparableTimeMark {
|
||||
private final long offset;
|
||||
private final long startedAt;
|
||||
private final AbstractLongTimeSource timeSource;
|
||||
|
||||
public /* synthetic */ LongTimeMark(long j, AbstractLongTimeSource abstractLongTimeSource, long j2, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(j, abstractLongTimeSource, j2);
|
||||
}
|
||||
|
||||
private LongTimeMark(long j, AbstractLongTimeSource timeSource, long j2) {
|
||||
Intrinsics.checkNotNullParameter(timeSource, "timeSource");
|
||||
this.startedAt = j;
|
||||
this.timeSource = timeSource;
|
||||
this.offset = j2;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(ComparableTimeMark comparableTimeMark) {
|
||||
return ComparableTimeMark.DefaultImpls.compareTo(this, comparableTimeMark);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasNotPassedNow() {
|
||||
return ComparableTimeMark.DefaultImpls.hasNotPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasPassedNow() {
|
||||
return ComparableTimeMark.DefaultImpls.hasPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
public ComparableTimeMark mo1665minusLRDsOJo(long j) {
|
||||
return ComparableTimeMark.DefaultImpls.m1670minusLRDsOJo(this, j);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: elapsedNow-UwyO8pc */
|
||||
public long mo1664elapsedNowUwyO8pc() {
|
||||
return Duration.m1707isInfiniteimpl(this.offset) ? Duration.m1727unaryMinusUwyO8pc(this.offset) : Duration.m1710minusLRDsOJo(DurationKt.toDuration(this.timeSource.read() - this.startedAt, this.timeSource.getUnit()), this.offset);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
public ComparableTimeMark mo1667plusLRDsOJo(long duration) {
|
||||
return new LongTimeMark(this.startedAt, this.timeSource, Duration.m1711plusLRDsOJo(this.offset, duration), null);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
/* renamed from: minus-UwyO8pc */
|
||||
public long mo1666minusUwyO8pc(ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
if (other instanceof LongTimeMark) {
|
||||
LongTimeMark longTimeMark = (LongTimeMark) other;
|
||||
if (Intrinsics.areEqual(this.timeSource, longTimeMark.timeSource)) {
|
||||
if (Duration.m1680equalsimpl0(this.offset, longTimeMark.offset) && Duration.m1707isInfiniteimpl(this.offset)) {
|
||||
return Duration.INSTANCE.m1777getZEROUwyO8pc();
|
||||
}
|
||||
long m1710minusLRDsOJo = Duration.m1710minusLRDsOJo(this.offset, longTimeMark.offset);
|
||||
long duration = DurationKt.toDuration(this.startedAt - longTimeMark.startedAt, this.timeSource.getUnit());
|
||||
return Duration.m1680equalsimpl0(duration, Duration.m1727unaryMinusUwyO8pc(m1710minusLRDsOJo)) ? Duration.INSTANCE.m1777getZEROUwyO8pc() : Duration.m1711plusLRDsOJo(duration, m1710minusLRDsOJo);
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("Subtracting or comparing time marks from different time sources is not possible: " + this + " and " + other);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public boolean equals(Object other) {
|
||||
return (other instanceof LongTimeMark) && Intrinsics.areEqual(this.timeSource, ((LongTimeMark) other).timeSource) && Duration.m1680equalsimpl0(mo1666minusUwyO8pc((ComparableTimeMark) other), Duration.INSTANCE.m1777getZEROUwyO8pc());
|
||||
}
|
||||
|
||||
/* renamed from: effectiveDuration-UwyO8pc$kotlin_stdlib, reason: not valid java name */
|
||||
public final long m1668effectiveDurationUwyO8pc$kotlin_stdlib() {
|
||||
if (Duration.m1707isInfiniteimpl(this.offset)) {
|
||||
return this.offset;
|
||||
}
|
||||
DurationUnit unit = this.timeSource.getUnit();
|
||||
if (unit.compareTo(DurationUnit.MILLISECONDS) >= 0) {
|
||||
return Duration.m1711plusLRDsOJo(DurationKt.toDuration(this.startedAt, unit), this.offset);
|
||||
}
|
||||
long convertDurationUnit = DurationUnitKt.convertDurationUnit(1L, DurationUnit.MILLISECONDS, unit);
|
||||
long j = this.startedAt;
|
||||
long j2 = j / convertDurationUnit;
|
||||
long j3 = j % convertDurationUnit;
|
||||
long j4 = this.offset;
|
||||
long m1696getInWholeSecondsimpl = Duration.m1696getInWholeSecondsimpl(j4);
|
||||
int m1698getNanosecondsComponentimpl = Duration.m1698getNanosecondsComponentimpl(j4);
|
||||
int i = m1698getNanosecondsComponentimpl / DurationKt.NANOS_IN_MILLIS;
|
||||
int i2 = m1698getNanosecondsComponentimpl % DurationKt.NANOS_IN_MILLIS;
|
||||
long duration = DurationKt.toDuration(j3, unit);
|
||||
Duration.Companion companion = Duration.INSTANCE;
|
||||
long m1711plusLRDsOJo = Duration.m1711plusLRDsOJo(duration, DurationKt.toDuration(i2, DurationUnit.NANOSECONDS));
|
||||
Duration.Companion companion2 = Duration.INSTANCE;
|
||||
long m1711plusLRDsOJo2 = Duration.m1711plusLRDsOJo(m1711plusLRDsOJo, DurationKt.toDuration(j2 + i, DurationUnit.MILLISECONDS));
|
||||
Duration.Companion companion3 = Duration.INSTANCE;
|
||||
return Duration.m1711plusLRDsOJo(m1711plusLRDsOJo2, DurationKt.toDuration(m1696getInWholeSecondsimpl, DurationUnit.SECONDS));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public int hashCode() {
|
||||
return Duration.m1703hashCodeimpl(m1668effectiveDurationUwyO8pc$kotlin_stdlib());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "LongTimeMark(" + this.startedAt + DurationUnitKt.shortName(this.timeSource.getUnit()) + " + " + ((Object) Duration.m1724toStringimpl(this.offset)) + " (=" + ((Object) Duration.m1724toStringimpl(m1668effectiveDurationUwyO8pc$kotlin_stdlib())) + "), " + this.timeSource + ')';
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource
|
||||
public ComparableTimeMark markNow() {
|
||||
return new LongTimeMark(read(), this, Duration.INSTANCE.m1777getZEROUwyO8pc(), null);
|
||||
}
|
||||
}
|
62
02-Easy5/E5/sources/kotlin/time/AdjustedTimeMark.java
Normal file
62
02-Easy5/E5/sources/kotlin/time/AdjustedTimeMark.java
Normal file
@ -0,0 +1,62 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.TimeMark;
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\r\b\u0003\u0018\u00002\u00020\u0001B\u0018\u0012\u0006\u0010\u0002\u001a\u00020\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004ø\u0001\u0000¢\u0006\u0002\u0010\u0005J\u0015\u0010\u000b\u001a\u00020\u0004H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\f\u0010\u0007J\u001b\u0010\r\u001a\u00020\u00012\u0006\u0010\u000e\u001a\u00020\u0004H\u0096\u0002ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\u0010R\u0019\u0010\u0003\u001a\u00020\u0004ø\u0001\u0000ø\u0001\u0001¢\u0006\n\n\u0002\u0010\b\u001a\u0004\b\u0006\u0010\u0007R\u0011\u0010\u0002\u001a\u00020\u0001¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\n\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u0011"}, d2 = {"Lkotlin/time/AdjustedTimeMark;", "Lkotlin/time/TimeMark;", "mark", "adjustment", "Lkotlin/time/Duration;", "(Lkotlin/time/TimeMark;JLkotlin/jvm/internal/DefaultConstructorMarker;)V", "getAdjustment-UwyO8pc", "()J", "J", "getMark", "()Lkotlin/time/TimeMark;", "elapsedNow", "elapsedNow-UwyO8pc", "plus", TypedValues.TransitionType.S_DURATION, "plus-LRDsOJo", "(J)Lkotlin/time/TimeMark;", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class AdjustedTimeMark implements TimeMark {
|
||||
private final long adjustment;
|
||||
private final TimeMark mark;
|
||||
|
||||
public /* synthetic */ AdjustedTimeMark(TimeMark timeMark, long j, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(timeMark, j);
|
||||
}
|
||||
|
||||
/* renamed from: getAdjustment-UwyO8pc, reason: not valid java name and from getter */
|
||||
public final long getAdjustment() {
|
||||
return this.adjustment;
|
||||
}
|
||||
|
||||
public final TimeMark getMark() {
|
||||
return this.mark;
|
||||
}
|
||||
|
||||
private AdjustedTimeMark(TimeMark mark, long j) {
|
||||
Intrinsics.checkNotNullParameter(mark, "mark");
|
||||
this.mark = mark;
|
||||
this.adjustment = j;
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasNotPassedNow() {
|
||||
return TimeMark.DefaultImpls.hasNotPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasPassedNow() {
|
||||
return TimeMark.DefaultImpls.hasPassedNow(this);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
public TimeMark mo1665minusLRDsOJo(long j) {
|
||||
return TimeMark.DefaultImpls.m1811minusLRDsOJo(this, j);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: elapsedNow-UwyO8pc */
|
||||
public long mo1664elapsedNowUwyO8pc() {
|
||||
return Duration.m1710minusLRDsOJo(this.mark.mo1664elapsedNowUwyO8pc(), this.adjustment);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
public TimeMark mo1667plusLRDsOJo(long duration) {
|
||||
return new AdjustedTimeMark(this.mark, Duration.m1711plusLRDsOJo(this.adjustment, duration), null);
|
||||
}
|
||||
}
|
50
02-Easy5/E5/sources/kotlin/time/ComparableTimeMark.java
Normal file
50
02-Easy5/E5/sources/kotlin/time/ComparableTimeMark.java
Normal file
@ -0,0 +1,50 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.TimeMark;
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000f\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\b\bg\u0018\u00002\u00020\u00012\b\u0012\u0004\u0012\u00020\u00000\u0002J\u0011\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0000H\u0096\u0002J\u0013\u0010\u0006\u001a\u00020\u00072\b\u0010\u0005\u001a\u0004\u0018\u00010\bH¦\u0002J\b\u0010\t\u001a\u00020\u0004H&J\u001e\u0010\n\u001a\u00020\u000b2\u0006\u0010\u0005\u001a\u00020\u0000H¦\u0002ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\f\u0010\rJ\u001b\u0010\n\u001a\u00020\u00002\u0006\u0010\u000e\u001a\u00020\u000bH\u0096\u0002ø\u0001\u0001¢\u0006\u0004\b\u000f\u0010\u0010J\u001b\u0010\u0011\u001a\u00020\u00002\u0006\u0010\u000e\u001a\u00020\u000bH¦\u0002ø\u0001\u0001¢\u0006\u0004\b\u0012\u0010\u0010\u0082\u0002\b\n\u0002\b!\n\u0002\b\u0019¨\u0006\u0013"}, d2 = {"Lkotlin/time/ComparableTimeMark;", "Lkotlin/time/TimeMark;", "", "compareTo", "", "other", "equals", "", "", "hashCode", "minus", "Lkotlin/time/Duration;", "minus-UwyO8pc", "(Lkotlin/time/ComparableTimeMark;)J", TypedValues.TransitionType.S_DURATION, "minus-LRDsOJo", "(J)Lkotlin/time/ComparableTimeMark;", "plus", "plus-LRDsOJo", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface ComparableTimeMark extends TimeMark, Comparable<ComparableTimeMark> {
|
||||
int compareTo(ComparableTimeMark other);
|
||||
|
||||
boolean equals(Object other);
|
||||
|
||||
int hashCode();
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
ComparableTimeMark mo1665minusLRDsOJo(long duration);
|
||||
|
||||
/* renamed from: minus-UwyO8pc */
|
||||
long mo1666minusUwyO8pc(ComparableTimeMark other);
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
ComparableTimeMark mo1667plusLRDsOJo(long duration);
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
public static boolean hasNotPassedNow(ComparableTimeMark comparableTimeMark) {
|
||||
return TimeMark.DefaultImpls.hasNotPassedNow(comparableTimeMark);
|
||||
}
|
||||
|
||||
public static boolean hasPassedNow(ComparableTimeMark comparableTimeMark) {
|
||||
return TimeMark.DefaultImpls.hasPassedNow(comparableTimeMark);
|
||||
}
|
||||
|
||||
/* renamed from: minus-LRDsOJo, reason: not valid java name */
|
||||
public static ComparableTimeMark m1670minusLRDsOJo(ComparableTimeMark comparableTimeMark, long j) {
|
||||
return comparableTimeMark.mo1667plusLRDsOJo(Duration.m1727unaryMinusUwyO8pc(j));
|
||||
}
|
||||
|
||||
public static int compareTo(ComparableTimeMark comparableTimeMark, ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
return Duration.m1674compareToLRDsOJo(comparableTimeMark.mo1666minusUwyO8pc(other), Duration.INSTANCE.m1777getZEROUwyO8pc());
|
||||
}
|
||||
}
|
||||
}
|
1158
02-Easy5/E5/sources/kotlin/time/Duration.java
Normal file
1158
02-Easy5/E5/sources/kotlin/time/Duration.java
Normal file
File diff suppressed because one or more lines are too long
64
02-Easy5/E5/sources/kotlin/time/DurationJvmKt.java
Normal file
64
02-Easy5/E5/sources/kotlin/time/DurationJvmKt.java
Normal file
@ -0,0 +1,64 @@
|
||||
package kotlin.time;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
import java.text.DecimalFormat;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: DurationJvm.kt */
|
||||
@Metadata(d1 = {"\u0000.\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0002\u001a\u0010\u0010\t\u001a\u00020\u00072\u0006\u0010\n\u001a\u00020\u000bH\u0002\u001a\u0018\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\n\u001a\u00020\u000bH\u0000\u001a\u0018\u0010\u0010\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\n\u001a\u00020\u000bH\u0000\"\u0014\u0010\u0000\u001a\u00020\u0001X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0002\u0010\u0003\"\u001c\u0010\u0004\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00070\u00060\u0005X\u0082\u0004¢\u0006\u0004\n\u0002\u0010\b¨\u0006\u0011"}, d2 = {"durationAssertionsEnabled", "", "getDurationAssertionsEnabled", "()Z", "precisionFormats", "", "Ljava/lang/ThreadLocal;", "Ljava/text/DecimalFormat;", "[Ljava/lang/ThreadLocal;", "createFormatForDecimals", "decimals", "", "formatToExactDecimals", "", "value", "", "formatUpToDecimals", "kotlin-stdlib"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DurationJvmKt {
|
||||
private static final boolean durationAssertionsEnabled = false;
|
||||
private static final ThreadLocal<DecimalFormat>[] precisionFormats;
|
||||
|
||||
public static final boolean getDurationAssertionsEnabled() {
|
||||
return durationAssertionsEnabled;
|
||||
}
|
||||
|
||||
static {
|
||||
ThreadLocal<DecimalFormat>[] threadLocalArr = new ThreadLocal[4];
|
||||
for (int i = 0; i < 4; i++) {
|
||||
threadLocalArr[i] = new ThreadLocal<>();
|
||||
}
|
||||
precisionFormats = threadLocalArr;
|
||||
}
|
||||
|
||||
private static final DecimalFormat createFormatForDecimals(int i) {
|
||||
DecimalFormat decimalFormat = new DecimalFormat("0");
|
||||
if (i > 0) {
|
||||
decimalFormat.setMinimumFractionDigits(i);
|
||||
}
|
||||
decimalFormat.setRoundingMode(RoundingMode.HALF_UP);
|
||||
return decimalFormat;
|
||||
}
|
||||
|
||||
public static final String formatToExactDecimals(double d, int i) {
|
||||
DecimalFormat createFormatForDecimals;
|
||||
ThreadLocal<DecimalFormat>[] threadLocalArr = precisionFormats;
|
||||
if (i < threadLocalArr.length) {
|
||||
ThreadLocal<DecimalFormat> threadLocal = threadLocalArr[i];
|
||||
DecimalFormat decimalFormat = threadLocal.get();
|
||||
if (decimalFormat == null) {
|
||||
decimalFormat = createFormatForDecimals(i);
|
||||
threadLocal.set(decimalFormat);
|
||||
} else {
|
||||
Intrinsics.checkNotNullExpressionValue(decimalFormat, "get() ?: default().also(this::set)");
|
||||
}
|
||||
createFormatForDecimals = decimalFormat;
|
||||
} else {
|
||||
createFormatForDecimals = createFormatForDecimals(i);
|
||||
}
|
||||
String format = createFormatForDecimals.format(d);
|
||||
Intrinsics.checkNotNullExpressionValue(format, "format.format(value)");
|
||||
return format;
|
||||
}
|
||||
|
||||
public static final String formatUpToDecimals(double d, int i) {
|
||||
DecimalFormat createFormatForDecimals = createFormatForDecimals(0);
|
||||
createFormatForDecimals.setMaximumFractionDigits(i);
|
||||
String format = createFormatForDecimals.format(d);
|
||||
Intrinsics.checkNotNullExpressionValue(format, "createFormatForDecimals(… }\n .format(value)");
|
||||
return format;
|
||||
}
|
||||
}
|
515
02-Easy5/E5/sources/kotlin/time/DurationKt.java
Normal file
515
02-Easy5/E5/sources/kotlin/time/DurationKt.java
Normal file
File diff suppressed because one or more lines are too long
28
02-Easy5/E5/sources/kotlin/time/DurationUnit.java
Normal file
28
02-Easy5/E5/sources/kotlin/time/DurationUnit.java
Normal file
@ -0,0 +1,28 @@
|
||||
package kotlin.time;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: DurationUnitJvm.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\b\u0087\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u000f\b\u0002\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004R\u0014\u0010\u0002\u001a\u00020\u0003X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006j\u0002\b\u0007j\u0002\b\bj\u0002\b\tj\u0002\b\nj\u0002\b\u000bj\u0002\b\fj\u0002\b\r¨\u0006\u000e"}, d2 = {"Lkotlin/time/DurationUnit;", "", "timeUnit", "Ljava/util/concurrent/TimeUnit;", "(Ljava/lang/String;ILjava/util/concurrent/TimeUnit;)V", "getTimeUnit$kotlin_stdlib", "()Ljava/util/concurrent/TimeUnit;", "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public enum DurationUnit {
|
||||
NANOSECONDS(TimeUnit.NANOSECONDS),
|
||||
MICROSECONDS(TimeUnit.MICROSECONDS),
|
||||
MILLISECONDS(TimeUnit.MILLISECONDS),
|
||||
SECONDS(TimeUnit.SECONDS),
|
||||
MINUTES(TimeUnit.MINUTES),
|
||||
HOURS(TimeUnit.HOURS),
|
||||
DAYS(TimeUnit.DAYS);
|
||||
|
||||
private final TimeUnit timeUnit;
|
||||
|
||||
/* renamed from: getTimeUnit$kotlin_stdlib, reason: from getter */
|
||||
public final TimeUnit getTimeUnit() {
|
||||
return this.timeUnit;
|
||||
}
|
||||
|
||||
DurationUnit(TimeUnit timeUnit) {
|
||||
this.timeUnit = timeUnit;
|
||||
}
|
||||
}
|
10
02-Easy5/E5/sources/kotlin/time/DurationUnitKt.java
Normal file
10
02-Easy5/E5/sources/kotlin/time/DurationUnitKt.java
Normal file
@ -0,0 +1,10 @@
|
||||
package kotlin.time;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
@Metadata(d1 = {"kotlin/time/DurationUnitKt__DurationUnitJvmKt", "kotlin/time/DurationUnitKt__DurationUnitKt"}, k = 4, mv = {1, 8, 0}, xi = 49)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DurationUnitKt extends DurationUnitKt__DurationUnitKt {
|
||||
private DurationUnitKt() {
|
||||
}
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package kotlin.time;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.NoWhenBranchMatchedException;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: DurationUnitJvm.kt */
|
||||
@Metadata(d1 = {"\u0000 \n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a \u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0004H\u0001\u001a \u0010\u0000\u001a\u00020\u00062\u0006\u0010\u0002\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0004H\u0001\u001a \u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0002\u001a\u00020\u00062\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0004H\u0001\u001a\f\u0010\b\u001a\u00020\u0004*\u00020\tH\u0007\u001a\f\u0010\n\u001a\u00020\t*\u00020\u0004H\u0007¨\u0006\u000b"}, d2 = {"convertDurationUnit", "", "value", "sourceUnit", "Lkotlin/time/DurationUnit;", "targetUnit", "", "convertDurationUnitOverflow", "toDurationUnit", "Ljava/util/concurrent/TimeUnit;", "toTimeUnit", "kotlin-stdlib"}, k = 5, mv = {1, 8, 0}, xi = 49, xs = "kotlin/time/DurationUnitKt")
|
||||
/* loaded from: classes.dex */
|
||||
class DurationUnitKt__DurationUnitJvmKt {
|
||||
|
||||
/* compiled from: DurationUnitJvm.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[TimeUnit.values().length];
|
||||
try {
|
||||
iArr[TimeUnit.NANOSECONDS.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.MICROSECONDS.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.MILLISECONDS.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.SECONDS.ordinal()] = 4;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.MINUTES.ordinal()] = 5;
|
||||
} catch (NoSuchFieldError unused5) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.HOURS.ordinal()] = 6;
|
||||
} catch (NoSuchFieldError unused6) {
|
||||
}
|
||||
try {
|
||||
iArr[TimeUnit.DAYS.ordinal()] = 7;
|
||||
} catch (NoSuchFieldError unused7) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
public static final TimeUnit toTimeUnit(DurationUnit durationUnit) {
|
||||
Intrinsics.checkNotNullParameter(durationUnit, "<this>");
|
||||
return durationUnit.getTimeUnit();
|
||||
}
|
||||
|
||||
public static final DurationUnit toDurationUnit(TimeUnit timeUnit) {
|
||||
Intrinsics.checkNotNullParameter(timeUnit, "<this>");
|
||||
switch (WhenMappings.$EnumSwitchMapping$0[timeUnit.ordinal()]) {
|
||||
case 1:
|
||||
return DurationUnit.NANOSECONDS;
|
||||
case 2:
|
||||
return DurationUnit.MICROSECONDS;
|
||||
case 3:
|
||||
return DurationUnit.MILLISECONDS;
|
||||
case 4:
|
||||
return DurationUnit.SECONDS;
|
||||
case 5:
|
||||
return DurationUnit.MINUTES;
|
||||
case 6:
|
||||
return DurationUnit.HOURS;
|
||||
case 7:
|
||||
return DurationUnit.DAYS;
|
||||
default:
|
||||
throw new NoWhenBranchMatchedException();
|
||||
}
|
||||
}
|
||||
|
||||
public static final double convertDurationUnit(double d, DurationUnit sourceUnit, DurationUnit targetUnit) {
|
||||
Intrinsics.checkNotNullParameter(sourceUnit, "sourceUnit");
|
||||
Intrinsics.checkNotNullParameter(targetUnit, "targetUnit");
|
||||
long convert = targetUnit.getTimeUnit().convert(1L, sourceUnit.getTimeUnit());
|
||||
return convert > 0 ? d * convert : d / sourceUnit.getTimeUnit().convert(1L, targetUnit.getTimeUnit());
|
||||
}
|
||||
|
||||
public static final long convertDurationUnitOverflow(long j, DurationUnit sourceUnit, DurationUnit targetUnit) {
|
||||
Intrinsics.checkNotNullParameter(sourceUnit, "sourceUnit");
|
||||
Intrinsics.checkNotNullParameter(targetUnit, "targetUnit");
|
||||
return targetUnit.getTimeUnit().convert(j, sourceUnit.getTimeUnit());
|
||||
}
|
||||
|
||||
public static final long convertDurationUnit(long j, DurationUnit sourceUnit, DurationUnit targetUnit) {
|
||||
Intrinsics.checkNotNullParameter(sourceUnit, "sourceUnit");
|
||||
Intrinsics.checkNotNullParameter(targetUnit, "targetUnit");
|
||||
return targetUnit.getTimeUnit().convert(j, sourceUnit.getTimeUnit());
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
package kotlin.time;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: DurationUnit.kt */
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\f\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\u001a\u0018\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u0005H\u0001\u001a\u0010\u0010\u0006\u001a\u00020\u00012\u0006\u0010\u0007\u001a\u00020\bH\u0001\u001a\f\u0010\u0007\u001a\u00020\b*\u00020\u0001H\u0001¨\u0006\t"}, d2 = {"durationUnitByIsoChar", "Lkotlin/time/DurationUnit;", "isoChar", "", "isTimeComponent", "", "durationUnitByShortName", "shortName", "", "kotlin-stdlib"}, k = 5, mv = {1, 8, 0}, xi = 49, xs = "kotlin/time/DurationUnitKt")
|
||||
/* loaded from: classes.dex */
|
||||
class DurationUnitKt__DurationUnitKt extends DurationUnitKt__DurationUnitJvmKt {
|
||||
|
||||
/* compiled from: DurationUnit.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[DurationUnit.values().length];
|
||||
try {
|
||||
iArr[DurationUnit.NANOSECONDS.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.MICROSECONDS.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.MILLISECONDS.ordinal()] = 3;
|
||||
} catch (NoSuchFieldError unused3) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.SECONDS.ordinal()] = 4;
|
||||
} catch (NoSuchFieldError unused4) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.MINUTES.ordinal()] = 5;
|
||||
} catch (NoSuchFieldError unused5) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.HOURS.ordinal()] = 6;
|
||||
} catch (NoSuchFieldError unused6) {
|
||||
}
|
||||
try {
|
||||
iArr[DurationUnit.DAYS.ordinal()] = 7;
|
||||
} catch (NoSuchFieldError unused7) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
public static final String shortName(DurationUnit durationUnit) {
|
||||
Intrinsics.checkNotNullParameter(durationUnit, "<this>");
|
||||
switch (WhenMappings.$EnumSwitchMapping$0[durationUnit.ordinal()]) {
|
||||
case 1:
|
||||
return "ns";
|
||||
case 2:
|
||||
return "us";
|
||||
case 3:
|
||||
return "ms";
|
||||
case 4:
|
||||
return "s";
|
||||
case 5:
|
||||
return "m";
|
||||
case 6:
|
||||
return "h";
|
||||
case 7:
|
||||
return "d";
|
||||
default:
|
||||
throw new IllegalStateException(("Unknown unit: " + durationUnit).toString());
|
||||
}
|
||||
}
|
||||
|
||||
public static final DurationUnit durationUnitByShortName(String shortName) {
|
||||
Intrinsics.checkNotNullParameter(shortName, "shortName");
|
||||
int hashCode = shortName.hashCode();
|
||||
if (hashCode != 100) {
|
||||
if (hashCode != 104) {
|
||||
if (hashCode != 109) {
|
||||
if (hashCode != 115) {
|
||||
if (hashCode != 3494) {
|
||||
if (hashCode != 3525) {
|
||||
if (hashCode == 3742 && shortName.equals("us")) {
|
||||
return DurationUnit.MICROSECONDS;
|
||||
}
|
||||
} else if (shortName.equals("ns")) {
|
||||
return DurationUnit.NANOSECONDS;
|
||||
}
|
||||
} else if (shortName.equals("ms")) {
|
||||
return DurationUnit.MILLISECONDS;
|
||||
}
|
||||
} else if (shortName.equals("s")) {
|
||||
return DurationUnit.SECONDS;
|
||||
}
|
||||
} else if (shortName.equals("m")) {
|
||||
return DurationUnit.MINUTES;
|
||||
}
|
||||
} else if (shortName.equals("h")) {
|
||||
return DurationUnit.HOURS;
|
||||
}
|
||||
} else if (shortName.equals("d")) {
|
||||
return DurationUnit.DAYS;
|
||||
}
|
||||
throw new IllegalArgumentException("Unknown duration unit short name: " + shortName);
|
||||
}
|
||||
|
||||
public static final DurationUnit durationUnitByIsoChar(char c, boolean z) {
|
||||
if (!z) {
|
||||
if (c == 'D') {
|
||||
return DurationUnit.DAYS;
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid or unsupported duration ISO non-time unit: " + c);
|
||||
}
|
||||
if (c == 'H') {
|
||||
return DurationUnit.HOURS;
|
||||
}
|
||||
if (c == 'M') {
|
||||
return DurationUnit.MINUTES;
|
||||
}
|
||||
if (c == 'S') {
|
||||
return DurationUnit.SECONDS;
|
||||
}
|
||||
throw new IllegalArgumentException("Invalid duration ISO time unit: " + c);
|
||||
}
|
||||
}
|
23
02-Easy5/E5/sources/kotlin/time/ExperimentalTime.java
Normal file
23
02-Easy5/E5/sources/kotlin/time/ExperimentalTime.java
Normal file
@ -0,0 +1,23 @@
|
||||
package kotlin.time;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.annotation.AnnotationRetention;
|
||||
import kotlin.annotation.AnnotationTarget;
|
||||
import kotlin.annotation.MustBeDocumented;
|
||||
|
||||
/* compiled from: ExperimentalTime.kt */
|
||||
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE})
|
||||
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS})
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@kotlin.annotation.Retention(AnnotationRetention.BINARY)
|
||||
@MustBeDocumented
|
||||
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\b\u0087\u0002\u0018\u00002\u00020\u0001B\u0000¨\u0006\u0002"}, d2 = {"Lkotlin/time/ExperimentalTime;", "", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
@Documented
|
||||
/* loaded from: classes.dex */
|
||||
public @interface ExperimentalTime {
|
||||
}
|
79
02-Easy5/E5/sources/kotlin/time/LongSaturatedMathKt.java
Normal file
79
02-Easy5/E5/sources/kotlin/time/LongSaturatedMathKt.java
Normal file
@ -0,0 +1,79 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.time.Duration;
|
||||
|
||||
/* compiled from: longSaturatedMath.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0012\n\u0002\u0010\u000b\n\u0000\u001a*\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0001H\u0002ø\u0001\u0000¢\u0006\u0004\b\u0006\u0010\u0007\u001a\"\u0010\b\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0004H\u0000ø\u0001\u0000¢\u0006\u0004\b\t\u0010\n\u001a\"\u0010\u000b\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0004H\u0002ø\u0001\u0000¢\u0006\u0004\b\f\u0010\n\u001a \u0010\r\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u00012\u0006\u0010\u000f\u001a\u00020\u0001H\u0000ø\u0001\u0000¢\u0006\u0002\u0010\n\u001a \u0010\u0010\u001a\u00020\u00042\u0006\u0010\u0011\u001a\u00020\u00012\u0006\u0010\u0012\u001a\u00020\u0001H\u0002ø\u0001\u0000¢\u0006\u0002\u0010\n\u001a \u0010\u0013\u001a\u00020\u00042\u0006\u0010\u0014\u001a\u00020\u00012\u0006\u0010\u0015\u001a\u00020\u0001H\u0000ø\u0001\u0000¢\u0006\u0002\u0010\n\u001a\r\u0010\u0016\u001a\u00020\u0017*\u00020\u0001H\u0082\b\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0018"}, d2 = {"checkInfiniteSumDefined", "", "longNs", TypedValues.TransitionType.S_DURATION, "Lkotlin/time/Duration;", "durationNs", "checkInfiniteSumDefined-PjuGub4", "(JJJ)J", "saturatingAdd", "saturatingAdd-pTJri5U", "(JJ)J", "saturatingAddInHalves", "saturatingAddInHalves-pTJri5U", "saturatingDiff", "valueNs", "originNs", "saturatingFiniteDiff", "value1Ns", "value2Ns", "saturatingOriginsDiff", "origin1Ns", "origin2Ns", "isSaturated", "", "kotlin-stdlib"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class LongSaturatedMathKt {
|
||||
private static final boolean isSaturated(long j) {
|
||||
return ((j - 1) | 1) == Long.MAX_VALUE;
|
||||
}
|
||||
|
||||
/* renamed from: saturatingAdd-pTJri5U, reason: not valid java name */
|
||||
public static final long m1803saturatingAddpTJri5U(long j, long j2) {
|
||||
long m1695getInWholeNanosecondsimpl = Duration.m1695getInWholeNanosecondsimpl(j2);
|
||||
if (((j - 1) | 1) == Long.MAX_VALUE) {
|
||||
return m1802checkInfiniteSumDefinedPjuGub4(j, j2, m1695getInWholeNanosecondsimpl);
|
||||
}
|
||||
if ((1 | (m1695getInWholeNanosecondsimpl - 1)) == Long.MAX_VALUE) {
|
||||
return m1804saturatingAddInHalvespTJri5U(j, j2);
|
||||
}
|
||||
long j3 = j + m1695getInWholeNanosecondsimpl;
|
||||
return ((j ^ j3) & (m1695getInWholeNanosecondsimpl ^ j3)) < 0 ? j < 0 ? Long.MIN_VALUE : Long.MAX_VALUE : j3;
|
||||
}
|
||||
|
||||
/* renamed from: checkInfiniteSumDefined-PjuGub4, reason: not valid java name */
|
||||
private static final long m1802checkInfiniteSumDefinedPjuGub4(long j, long j2, long j3) {
|
||||
if (!Duration.m1707isInfiniteimpl(j2) || (j ^ j3) >= 0) {
|
||||
return j;
|
||||
}
|
||||
throw new IllegalArgumentException("Summing infinities of different signs");
|
||||
}
|
||||
|
||||
/* renamed from: saturatingAddInHalves-pTJri5U, reason: not valid java name */
|
||||
private static final long m1804saturatingAddInHalvespTJri5U(long j, long j2) {
|
||||
long m1678divUwyO8pc = Duration.m1678divUwyO8pc(j2, 2);
|
||||
if (((Duration.m1695getInWholeNanosecondsimpl(m1678divUwyO8pc) - 1) | 1) == Long.MAX_VALUE) {
|
||||
return (long) (j + Duration.m1718toDoubleimpl(j2, DurationUnit.NANOSECONDS));
|
||||
}
|
||||
return m1803saturatingAddpTJri5U(m1803saturatingAddpTJri5U(j, m1678divUwyO8pc), Duration.m1710minusLRDsOJo(j2, m1678divUwyO8pc));
|
||||
}
|
||||
|
||||
public static final long saturatingDiff(long j, long j2) {
|
||||
if ((1 | (j2 - 1)) == Long.MAX_VALUE) {
|
||||
return Duration.m1727unaryMinusUwyO8pc(DurationKt.toDuration(j2, DurationUnit.DAYS));
|
||||
}
|
||||
return saturatingFiniteDiff(j, j2);
|
||||
}
|
||||
|
||||
public static final long saturatingOriginsDiff(long j, long j2) {
|
||||
if (((j2 - 1) | 1) == Long.MAX_VALUE) {
|
||||
if (j == j2) {
|
||||
return Duration.INSTANCE.m1777getZEROUwyO8pc();
|
||||
}
|
||||
return Duration.m1727unaryMinusUwyO8pc(DurationKt.toDuration(j2, DurationUnit.DAYS));
|
||||
}
|
||||
if ((1 | (j - 1)) == Long.MAX_VALUE) {
|
||||
return DurationKt.toDuration(j, DurationUnit.DAYS);
|
||||
}
|
||||
return saturatingFiniteDiff(j, j2);
|
||||
}
|
||||
|
||||
private static final long saturatingFiniteDiff(long j, long j2) {
|
||||
long j3 = j - j2;
|
||||
if (((j3 ^ j) & (~(j3 ^ j2))) < 0) {
|
||||
long j4 = DurationKt.NANOS_IN_MILLIS;
|
||||
long j5 = (j / j4) - (j2 / j4);
|
||||
long j6 = (j % j4) - (j2 % j4);
|
||||
Duration.Companion companion = Duration.INSTANCE;
|
||||
long duration = DurationKt.toDuration(j5, DurationUnit.MILLISECONDS);
|
||||
Duration.Companion companion2 = Duration.INSTANCE;
|
||||
return Duration.m1711plusLRDsOJo(duration, DurationKt.toDuration(j6, DurationUnit.NANOSECONDS));
|
||||
}
|
||||
Duration.Companion companion3 = Duration.INSTANCE;
|
||||
return DurationKt.toDuration(j3, DurationUnit.NANOSECONDS);
|
||||
}
|
||||
}
|
52
02-Easy5/E5/sources/kotlin/time/MeasureTimeKt.java
Normal file
52
02-Easy5/E5/sources/kotlin/time/MeasureTimeKt.java
Normal file
@ -0,0 +1,52 @@
|
||||
package kotlin.time;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.TimeSource;
|
||||
|
||||
/* compiled from: measureTime.kt */
|
||||
@Metadata(d1 = {"\u0000(\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a/\u0010\u0000\u001a\u00020\u00012\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003H\u0087\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\u0005\u001a3\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b2\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u0002H\b0\u0003H\u0087\bø\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001\u001a3\u0010\u0000\u001a\u00020\u0001*\u00020\t2\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003H\u0087\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\n\u001a3\u0010\u0000\u001a\u00020\u0001*\u00020\u000b2\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003H\u0087\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\f\u001a7\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b*\u00020\t2\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u0002H\b0\u0003H\u0087\bø\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001\u001a7\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b*\u00020\u000b2\f\u0010\u0002\u001a\b\u0012\u0004\u0012\u0002H\b0\u0003H\u0087\bø\u0001\u0000\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001\u0082\u0002\u000b\n\u0005\b\u009920\u0001\n\u0002\b\u0019¨\u0006\r"}, d2 = {"measureTime", "Lkotlin/time/Duration;", "block", "Lkotlin/Function0;", "", "(Lkotlin/jvm/functions/Function0;)J", "measureTimedValue", "Lkotlin/time/TimedValue;", "T", "Lkotlin/time/TimeSource;", "(Lkotlin/time/TimeSource;Lkotlin/jvm/functions/Function0;)J", "Lkotlin/time/TimeSource$Monotonic;", "(Lkotlin/time/TimeSource$Monotonic;Lkotlin/jvm/functions/Function0;)J", "kotlin-stdlib"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class MeasureTimeKt {
|
||||
public static final long measureTime(Function0<Unit> block) {
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
long m1813markNowz9LOYto = TimeSource.Monotonic.INSTANCE.m1813markNowz9LOYto();
|
||||
block.invoke();
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1818elapsedNowUwyO8pc(m1813markNowz9LOYto);
|
||||
}
|
||||
|
||||
public static final long measureTime(TimeSource timeSource, Function0<Unit> block) {
|
||||
Intrinsics.checkNotNullParameter(timeSource, "<this>");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
TimeMark markNow = timeSource.markNow();
|
||||
block.invoke();
|
||||
return markNow.mo1664elapsedNowUwyO8pc();
|
||||
}
|
||||
|
||||
public static final long measureTime(TimeSource.Monotonic monotonic, Function0<Unit> block) {
|
||||
Intrinsics.checkNotNullParameter(monotonic, "<this>");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
long m1813markNowz9LOYto = monotonic.m1813markNowz9LOYto();
|
||||
block.invoke();
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1818elapsedNowUwyO8pc(m1813markNowz9LOYto);
|
||||
}
|
||||
|
||||
public static final <T> TimedValue<T> measureTimedValue(Function0<? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
return new TimedValue<>(block.invoke(), TimeSource.Monotonic.ValueTimeMark.m1818elapsedNowUwyO8pc(TimeSource.Monotonic.INSTANCE.m1813markNowz9LOYto()), null);
|
||||
}
|
||||
|
||||
public static final <T> TimedValue<T> measureTimedValue(TimeSource timeSource, Function0<? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(timeSource, "<this>");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
return new TimedValue<>(block.invoke(), timeSource.markNow().mo1664elapsedNowUwyO8pc(), null);
|
||||
}
|
||||
|
||||
public static final <T> TimedValue<T> measureTimedValue(TimeSource.Monotonic monotonic, Function0<? extends T> block) {
|
||||
Intrinsics.checkNotNullParameter(monotonic, "<this>");
|
||||
Intrinsics.checkNotNullParameter(block, "block");
|
||||
return new TimedValue<>(block.invoke(), TimeSource.Monotonic.ValueTimeMark.m1818elapsedNowUwyO8pc(monotonic.m1813markNowz9LOYto()), null);
|
||||
}
|
||||
}
|
11
02-Easy5/E5/sources/kotlin/time/MonoTimeSourceKt.java
Normal file
11
02-Easy5/E5/sources/kotlin/time/MonoTimeSourceKt.java
Normal file
@ -0,0 +1,11 @@
|
||||
package kotlin.time;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: MonoTimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\t\n\u0000*\f\b\u0000\u0010\u0000\"\u00020\u00012\u00020\u0001¨\u0006\u0002"}, d2 = {"ValueTimeMarkReading", "", "kotlin-stdlib"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class MonoTimeSourceKt {
|
||||
public static /* synthetic */ void ValueTimeMarkReading$annotations() {
|
||||
}
|
||||
}
|
54
02-Easy5/E5/sources/kotlin/time/MonotonicTimeSource.java
Normal file
54
02-Easy5/E5/sources/kotlin/time/MonotonicTimeSource.java
Normal file
@ -0,0 +1,54 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.time.TimeSource;
|
||||
|
||||
/* compiled from: MonoTimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0010\u000e\n\u0000\bÁ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J \u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u00062\u0006\u0010\b\u001a\u00020\tø\u0001\u0000¢\u0006\u0004\b\n\u0010\u000bJ \u0010\f\u001a\u00020\t2\u0006\u0010\r\u001a\u00020\u00062\u0006\u0010\u000e\u001a\u00020\u0006ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\u000bJ\u0018\u0010\u0010\u001a\u00020\t2\u0006\u0010\u0007\u001a\u00020\u0006ø\u0001\u0000¢\u0006\u0004\b\u0011\u0010\u0012J\u0015\u0010\u0013\u001a\u00020\u0006H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u0014\u0010\u0015J\b\u0010\u0016\u001a\u00020\u0004H\u0002J\b\u0010\u0017\u001a\u00020\u0018H\u0016R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u0019"}, d2 = {"Lkotlin/time/MonotonicTimeSource;", "Lkotlin/time/TimeSource$WithComparableMarks;", "()V", "zero", "", "adjustReading", "Lkotlin/time/TimeSource$Monotonic$ValueTimeMark;", "timeMark", TypedValues.TransitionType.S_DURATION, "Lkotlin/time/Duration;", "adjustReading-6QKq23U", "(JJ)J", "differenceBetween", "one", "another", "differenceBetween-fRLX17w", "elapsedFrom", "elapsedFrom-6eNON_k", "(J)J", "markNow", "markNow-z9LOYto", "()J", "read", "toString", "", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class MonotonicTimeSource implements TimeSource.WithComparableMarks {
|
||||
public static final MonotonicTimeSource INSTANCE = new MonotonicTimeSource();
|
||||
private static final long zero = System.nanoTime();
|
||||
|
||||
public String toString() {
|
||||
return "TimeSource(System.nanoTime())";
|
||||
}
|
||||
|
||||
private MonotonicTimeSource() {
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource.WithComparableMarks, kotlin.time.TimeSource
|
||||
public /* bridge */ /* synthetic */ ComparableTimeMark markNow() {
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1814boximpl(m1808markNowz9LOYto());
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource
|
||||
public /* bridge */ /* synthetic */ TimeMark markNow() {
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1814boximpl(m1808markNowz9LOYto());
|
||||
}
|
||||
|
||||
private final long read() {
|
||||
return System.nanoTime() - zero;
|
||||
}
|
||||
|
||||
/* renamed from: markNow-z9LOYto, reason: not valid java name */
|
||||
public long m1808markNowz9LOYto() {
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1817constructorimpl(read());
|
||||
}
|
||||
|
||||
/* renamed from: elapsedFrom-6eNON_k, reason: not valid java name */
|
||||
public final long m1807elapsedFrom6eNON_k(long timeMark) {
|
||||
return LongSaturatedMathKt.saturatingDiff(read(), timeMark);
|
||||
}
|
||||
|
||||
/* renamed from: differenceBetween-fRLX17w, reason: not valid java name */
|
||||
public final long m1806differenceBetweenfRLX17w(long one, long another) {
|
||||
return LongSaturatedMathKt.saturatingOriginsDiff(one, another);
|
||||
}
|
||||
|
||||
/* renamed from: adjustReading-6QKq23U, reason: not valid java name */
|
||||
public final long m1805adjustReading6QKq23U(long timeMark, long duration) {
|
||||
return TimeSource.Monotonic.ValueTimeMark.m1817constructorimpl(LongSaturatedMathKt.m1803saturatingAddpTJri5U(timeMark, duration));
|
||||
}
|
||||
}
|
46
02-Easy5/E5/sources/kotlin/time/TestTimeSource.java
Normal file
46
02-Easy5/E5/sources/kotlin/time/TestTimeSource.java
Normal file
@ -0,0 +1,46 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: TimeSources.kt */
|
||||
@Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0007\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u001a\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0002ø\u0001\u0000¢\u0006\u0004\b\t\u0010\nJ\u001b\u0010\u000b\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0086\u0002ø\u0001\u0000¢\u0006\u0004\b\f\u0010\nJ\b\u0010\r\u001a\u00020\u0004H\u0014R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u000e¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u000e"}, d2 = {"Lkotlin/time/TestTimeSource;", "Lkotlin/time/AbstractLongTimeSource;", "()V", "reading", "", "overflow", "", TypedValues.TransitionType.S_DURATION, "Lkotlin/time/Duration;", "overflow-LRDsOJo", "(J)V", "plusAssign", "plusAssign-LRDsOJo", "read", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class TestTimeSource extends AbstractLongTimeSource {
|
||||
private long reading;
|
||||
|
||||
@Override // kotlin.time.AbstractLongTimeSource
|
||||
/* renamed from: read, reason: from getter */
|
||||
protected long getReading() {
|
||||
return this.reading;
|
||||
}
|
||||
|
||||
public TestTimeSource() {
|
||||
super(DurationUnit.NANOSECONDS);
|
||||
}
|
||||
|
||||
/* renamed from: plusAssign-LRDsOJo, reason: not valid java name */
|
||||
public final void m1810plusAssignLRDsOJo(long duration) {
|
||||
long j;
|
||||
long m1721toLongimpl = Duration.m1721toLongimpl(duration, getUnit());
|
||||
if (m1721toLongimpl == Long.MIN_VALUE || m1721toLongimpl == Long.MAX_VALUE) {
|
||||
double m1718toDoubleimpl = this.reading + Duration.m1718toDoubleimpl(duration, getUnit());
|
||||
if (m1718toDoubleimpl > 9.223372036854776E18d || m1718toDoubleimpl < -9.223372036854776E18d) {
|
||||
m1809overflowLRDsOJo(duration);
|
||||
}
|
||||
j = (long) m1718toDoubleimpl;
|
||||
} else {
|
||||
long j2 = this.reading;
|
||||
j = j2 + m1721toLongimpl;
|
||||
if ((m1721toLongimpl ^ j2) >= 0 && (j2 ^ j) < 0) {
|
||||
m1809overflowLRDsOJo(duration);
|
||||
}
|
||||
}
|
||||
this.reading = j;
|
||||
}
|
||||
|
||||
/* renamed from: overflow-LRDsOJo, reason: not valid java name */
|
||||
private final void m1809overflowLRDsOJo(long duration) {
|
||||
throw new IllegalStateException("TestTimeSource will overflow if its reading " + this.reading + DurationUnitKt.shortName(getUnit()) + " is advanced by " + ((Object) Duration.m1724toStringimpl(duration)) + '.');
|
||||
}
|
||||
}
|
44
02-Easy5/E5/sources/kotlin/time/TimeMark.java
Normal file
44
02-Easy5/E5/sources/kotlin/time/TimeMark.java
Normal file
@ -0,0 +1,44 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\b\bg\u0018\u00002\u00020\u0001J\u0015\u0010\u0002\u001a\u00020\u0003H&ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0004\u0010\u0005J\b\u0010\u0006\u001a\u00020\u0007H\u0016J\b\u0010\b\u001a\u00020\u0007H\u0016J\u001b\u0010\t\u001a\u00020\u00002\u0006\u0010\n\u001a\u00020\u0003H\u0096\u0002ø\u0001\u0001¢\u0006\u0004\b\u000b\u0010\fJ\u001b\u0010\r\u001a\u00020\u00002\u0006\u0010\n\u001a\u00020\u0003H\u0096\u0002ø\u0001\u0001¢\u0006\u0004\b\u000e\u0010\f\u0082\u0002\b\n\u0002\b!\n\u0002\b\u0019¨\u0006\u000f"}, d2 = {"Lkotlin/time/TimeMark;", "", "elapsedNow", "Lkotlin/time/Duration;", "elapsedNow-UwyO8pc", "()J", "hasNotPassedNow", "", "hasPassedNow", "minus", TypedValues.TransitionType.S_DURATION, "minus-LRDsOJo", "(J)Lkotlin/time/TimeMark;", "plus", "plus-LRDsOJo", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface TimeMark {
|
||||
/* renamed from: elapsedNow-UwyO8pc */
|
||||
long mo1664elapsedNowUwyO8pc();
|
||||
|
||||
boolean hasNotPassedNow();
|
||||
|
||||
boolean hasPassedNow();
|
||||
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
TimeMark mo1665minusLRDsOJo(long duration);
|
||||
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
TimeMark mo1667plusLRDsOJo(long duration);
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
/* renamed from: plus-LRDsOJo, reason: not valid java name */
|
||||
public static TimeMark m1812plusLRDsOJo(TimeMark timeMark, long j) {
|
||||
return new AdjustedTimeMark(timeMark, j, null);
|
||||
}
|
||||
|
||||
/* renamed from: minus-LRDsOJo, reason: not valid java name */
|
||||
public static TimeMark m1811minusLRDsOJo(TimeMark timeMark, long j) {
|
||||
return timeMark.mo1667plusLRDsOJo(Duration.m1727unaryMinusUwyO8pc(j));
|
||||
}
|
||||
|
||||
public static boolean hasPassedNow(TimeMark timeMark) {
|
||||
return !Duration.m1708isNegativeimpl(timeMark.mo1664elapsedNowUwyO8pc());
|
||||
}
|
||||
|
||||
public static boolean hasNotPassedNow(TimeMark timeMark) {
|
||||
return Duration.m1708isNegativeimpl(timeMark.mo1664elapsedNowUwyO8pc());
|
||||
}
|
||||
}
|
||||
}
|
235
02-Easy5/E5/sources/kotlin/time/TimeSource.java
Normal file
235
02-Easy5/E5/sources/kotlin/time/TimeSource.java
Normal file
@ -0,0 +1,235 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.UByte$$ExternalSyntheticBackport0;
|
||||
import kotlin.jvm.JvmInline;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.ComparableTimeMark;
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\bg\u0018\u0000 \u00042\u00020\u0001:\u0003\u0004\u0005\u0006J\b\u0010\u0002\u001a\u00020\u0003H&¨\u0006\u0007"}, d2 = {"Lkotlin/time/TimeSource;", "", "markNow", "Lkotlin/time/TimeMark;", "Companion", "Monotonic", "WithComparableMarks", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface TimeSource {
|
||||
|
||||
/* renamed from: Companion, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = Companion.$$INSTANCE;
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bg\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&¨\u0006\u0004"}, d2 = {"Lkotlin/time/TimeSource$WithComparableMarks;", "Lkotlin/time/TimeSource;", "markNow", "Lkotlin/time/ComparableTimeMark;", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public interface WithComparableMarks extends TimeSource {
|
||||
@Override // kotlin.time.TimeSource
|
||||
ComparableTimeMark markNow();
|
||||
}
|
||||
|
||||
TimeMark markNow();
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001:\u0001\tB\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0015\u0010\u0003\u001a\u00020\u0004H\u0016ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0005\u0010\u0006J\b\u0010\u0007\u001a\u00020\bH\u0016\u0082\u0002\b\n\u0002\b!\n\u0002\b\u0019¨\u0006\n"}, d2 = {"Lkotlin/time/TimeSource$Monotonic;", "Lkotlin/time/TimeSource$WithComparableMarks;", "()V", "markNow", "Lkotlin/time/TimeSource$Monotonic$ValueTimeMark;", "markNow-z9LOYto", "()J", "toString", "", "ValueTimeMark", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class Monotonic implements WithComparableMarks {
|
||||
public static final Monotonic INSTANCE = new Monotonic();
|
||||
|
||||
private Monotonic() {
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource.WithComparableMarks, kotlin.time.TimeSource
|
||||
public /* bridge */ /* synthetic */ ComparableTimeMark markNow() {
|
||||
return ValueTimeMark.m1814boximpl(m1813markNowz9LOYto());
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeSource
|
||||
public /* bridge */ /* synthetic */ TimeMark markNow() {
|
||||
return ValueTimeMark.m1814boximpl(m1813markNowz9LOYto());
|
||||
}
|
||||
|
||||
/* renamed from: markNow-z9LOYto, reason: not valid java name */
|
||||
public long m1813markNowz9LOYto() {
|
||||
return MonotonicTimeSource.INSTANCE.m1808markNowz9LOYto();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return MonotonicTimeSource.INSTANCE.toString();
|
||||
}
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\u0010\u0000\n\u0002\b\u0014\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0087@\u0018\u00002\u00020\u0001B\u0018\b\u0000\u0012\n\u0010\u0002\u001a\u00060\u0003j\u0002`\u0004ø\u0001\u0000¢\u0006\u0004\b\u0005\u0010\u0006J\u001b\u0010\u0007\u001a\u00020\b2\u0006\u0010\t\u001a\u00020\u0000H\u0086\u0002ø\u0001\u0000¢\u0006\u0004\b\n\u0010\u000bJ\u0015\u0010\f\u001a\u00020\rH\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u000e\u0010\u0006J\u001a\u0010\u000f\u001a\u00020\u00102\b\u0010\t\u001a\u0004\u0018\u00010\u0011HÖ\u0003¢\u0006\u0004\b\u0012\u0010\u0013J\u000f\u0010\u0014\u001a\u00020\u0010H\u0016¢\u0006\u0004\b\u0015\u0010\u0016J\u000f\u0010\u0017\u001a\u00020\u0010H\u0016¢\u0006\u0004\b\u0018\u0010\u0016J\u0010\u0010\u0019\u001a\u00020\bHÖ\u0001¢\u0006\u0004\b\u001a\u0010\u001bJ\u001e\u0010\u001c\u001a\u00020\r2\u0006\u0010\t\u001a\u00020\u0001H\u0096\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u001d\u0010\u001eJ\u001b\u0010\u001c\u001a\u00020\u00002\u0006\u0010\u001f\u001a\u00020\rH\u0096\u0002ø\u0001\u0000¢\u0006\u0004\b \u0010!J\u001b\u0010\u001c\u001a\u00020\r2\u0006\u0010\t\u001a\u00020\u0000H\u0086\u0002ø\u0001\u0000¢\u0006\u0004\b\"\u0010!J\u001b\u0010#\u001a\u00020\u00002\u0006\u0010\u001f\u001a\u00020\rH\u0096\u0002ø\u0001\u0000¢\u0006\u0004\b$\u0010!J\u0010\u0010%\u001a\u00020&HÖ\u0001¢\u0006\u0004\b'\u0010(R\u0012\u0010\u0002\u001a\u00060\u0003j\u0002`\u0004X\u0080\u0004¢\u0006\u0002\n\u0000\u0088\u0001\u0002\u0092\u0001\u00060\u0003j\u0002`\u0004ø\u0001\u0000\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006)"}, d2 = {"Lkotlin/time/TimeSource$Monotonic$ValueTimeMark;", "Lkotlin/time/ComparableTimeMark;", "reading", "", "Lkotlin/time/ValueTimeMarkReading;", "constructor-impl", "(J)J", "compareTo", "", "other", "compareTo-6eNON_k", "(JJ)I", "elapsedNow", "Lkotlin/time/Duration;", "elapsedNow-UwyO8pc", "equals", "", "", "equals-impl", "(JLjava/lang/Object;)Z", "hasNotPassedNow", "hasNotPassedNow-impl", "(J)Z", "hasPassedNow", "hasPassedNow-impl", "hashCode", "hashCode-impl", "(J)I", "minus", "minus-UwyO8pc", "(JLkotlin/time/ComparableTimeMark;)J", TypedValues.TransitionType.S_DURATION, "minus-LRDsOJo", "(JJ)J", "minus-6eNON_k", "plus", "plus-LRDsOJo", "toString", "", "toString-impl", "(J)Ljava/lang/String;", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
@JvmInline
|
||||
public static final class ValueTimeMark implements ComparableTimeMark {
|
||||
private final long reading;
|
||||
|
||||
/* renamed from: box-impl, reason: not valid java name */
|
||||
public static final /* synthetic */ ValueTimeMark m1814boximpl(long j) {
|
||||
return new ValueTimeMark(j);
|
||||
}
|
||||
|
||||
/* renamed from: constructor-impl, reason: not valid java name */
|
||||
public static long m1817constructorimpl(long j) {
|
||||
return j;
|
||||
}
|
||||
|
||||
/* renamed from: equals-impl, reason: not valid java name */
|
||||
public static boolean m1819equalsimpl(long j, Object obj) {
|
||||
return (obj instanceof ValueTimeMark) && j == ((ValueTimeMark) obj).getReading();
|
||||
}
|
||||
|
||||
/* renamed from: equals-impl0, reason: not valid java name */
|
||||
public static final boolean m1820equalsimpl0(long j, long j2) {
|
||||
return j == j2;
|
||||
}
|
||||
|
||||
/* renamed from: hashCode-impl, reason: not valid java name */
|
||||
public static int m1823hashCodeimpl(long j) {
|
||||
return UByte$$ExternalSyntheticBackport0.m(j);
|
||||
}
|
||||
|
||||
/* renamed from: toString-impl, reason: not valid java name */
|
||||
public static String m1828toStringimpl(long j) {
|
||||
return "ValueTimeMark(reading=" + j + ')';
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public boolean equals(Object obj) {
|
||||
return m1819equalsimpl(this.reading, obj);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
public int hashCode() {
|
||||
return m1823hashCodeimpl(this.reading);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return m1828toStringimpl(this.reading);
|
||||
}
|
||||
|
||||
/* renamed from: unbox-impl, reason: not valid java name and from getter */
|
||||
public final /* synthetic */ long getReading() {
|
||||
return this.reading;
|
||||
}
|
||||
|
||||
@Override // java.lang.Comparable
|
||||
public int compareTo(ComparableTimeMark comparableTimeMark) {
|
||||
return ComparableTimeMark.DefaultImpls.compareTo(this, comparableTimeMark);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark, kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
public /* bridge */ /* synthetic */ ComparableTimeMark mo1665minusLRDsOJo(long j) {
|
||||
return m1814boximpl(m1829minusLRDsOJo(j));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: minus-LRDsOJo */
|
||||
public /* bridge */ /* synthetic */ TimeMark mo1665minusLRDsOJo(long j) {
|
||||
return m1814boximpl(m1829minusLRDsOJo(j));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark, kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
public /* bridge */ /* synthetic */ ComparableTimeMark mo1667plusLRDsOJo(long j) {
|
||||
return m1814boximpl(m1830plusLRDsOJo(j));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: plus-LRDsOJo */
|
||||
public /* bridge */ /* synthetic */ TimeMark mo1667plusLRDsOJo(long j) {
|
||||
return m1814boximpl(m1830plusLRDsOJo(j));
|
||||
}
|
||||
|
||||
private /* synthetic */ ValueTimeMark(long j) {
|
||||
this.reading = j;
|
||||
}
|
||||
|
||||
/* renamed from: compareTo-impl, reason: not valid java name */
|
||||
public static int m1816compareToimpl(long j, ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
return m1814boximpl(j).compareTo(other);
|
||||
}
|
||||
|
||||
/* renamed from: elapsedNow-UwyO8pc, reason: not valid java name */
|
||||
public static long m1818elapsedNowUwyO8pc(long j) {
|
||||
return MonotonicTimeSource.INSTANCE.m1807elapsedFrom6eNON_k(j);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
/* renamed from: elapsedNow-UwyO8pc */
|
||||
public long mo1664elapsedNowUwyO8pc() {
|
||||
return m1818elapsedNowUwyO8pc(this.reading);
|
||||
}
|
||||
|
||||
/* renamed from: plus-LRDsOJo, reason: not valid java name */
|
||||
public static long m1827plusLRDsOJo(long j, long j2) {
|
||||
return MonotonicTimeSource.INSTANCE.m1805adjustReading6QKq23U(j, j2);
|
||||
}
|
||||
|
||||
/* renamed from: plus-LRDsOJo, reason: not valid java name */
|
||||
public long m1830plusLRDsOJo(long j) {
|
||||
return m1827plusLRDsOJo(this.reading, j);
|
||||
}
|
||||
|
||||
/* renamed from: minus-LRDsOJo, reason: not valid java name */
|
||||
public static long m1825minusLRDsOJo(long j, long j2) {
|
||||
return MonotonicTimeSource.INSTANCE.m1805adjustReading6QKq23U(j, Duration.m1727unaryMinusUwyO8pc(j2));
|
||||
}
|
||||
|
||||
/* renamed from: minus-LRDsOJo, reason: not valid java name */
|
||||
public long m1829minusLRDsOJo(long j) {
|
||||
return m1825minusLRDsOJo(this.reading, j);
|
||||
}
|
||||
|
||||
/* renamed from: hasPassedNow-impl, reason: not valid java name */
|
||||
public static boolean m1822hasPassedNowimpl(long j) {
|
||||
return !Duration.m1708isNegativeimpl(m1818elapsedNowUwyO8pc(j));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasPassedNow() {
|
||||
return m1822hasPassedNowimpl(this.reading);
|
||||
}
|
||||
|
||||
/* renamed from: hasNotPassedNow-impl, reason: not valid java name */
|
||||
public static boolean m1821hasNotPassedNowimpl(long j) {
|
||||
return Duration.m1708isNegativeimpl(m1818elapsedNowUwyO8pc(j));
|
||||
}
|
||||
|
||||
@Override // kotlin.time.TimeMark
|
||||
public boolean hasNotPassedNow() {
|
||||
return m1821hasNotPassedNowimpl(this.reading);
|
||||
}
|
||||
|
||||
@Override // kotlin.time.ComparableTimeMark
|
||||
/* renamed from: minus-UwyO8pc */
|
||||
public long mo1666minusUwyO8pc(ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
return m1826minusUwyO8pc(this.reading, other);
|
||||
}
|
||||
|
||||
/* renamed from: minus-UwyO8pc, reason: not valid java name */
|
||||
public static long m1826minusUwyO8pc(long j, ComparableTimeMark other) {
|
||||
Intrinsics.checkNotNullParameter(other, "other");
|
||||
if (!(other instanceof ValueTimeMark)) {
|
||||
throw new IllegalArgumentException("Subtracting or comparing time marks from different time sources is not possible: " + ((Object) m1828toStringimpl(j)) + " and " + other);
|
||||
}
|
||||
return m1824minus6eNON_k(j, ((ValueTimeMark) other).getReading());
|
||||
}
|
||||
|
||||
/* renamed from: minus-6eNON_k, reason: not valid java name */
|
||||
public static final long m1824minus6eNON_k(long j, long j2) {
|
||||
return MonotonicTimeSource.INSTANCE.m1806differenceBetweenfRLX17w(j, j2);
|
||||
}
|
||||
|
||||
/* renamed from: compareTo-6eNON_k, reason: not valid java name */
|
||||
public static final int m1815compareTo6eNON_k(long j, long j2) {
|
||||
return Duration.m1674compareToLRDsOJo(m1824minus6eNON_k(j, j2), Duration.INSTANCE.m1777getZEROUwyO8pc());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* compiled from: TimeSource.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lkotlin/time/TimeSource$Companion;", "", "()V", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class Companion {
|
||||
static final /* synthetic */ Companion $$INSTANCE = new Companion();
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
}
|
78
02-Easy5/E5/sources/kotlin/time/TimedValue.java
Normal file
78
02-Easy5/E5/sources/kotlin/time/TimedValue.java
Normal file
@ -0,0 +1,78 @@
|
||||
package kotlin.time;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: measureTime.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0087\b\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B\u0018\u0012\u0006\u0010\u0003\u001a\u00028\u0000\u0012\u0006\u0010\u0004\u001a\u00020\u0005ø\u0001\u0000¢\u0006\u0002\u0010\u0006J\u000e\u0010\r\u001a\u00028\u0000HÆ\u0003¢\u0006\u0002\u0010\u000bJ\u0016\u0010\u000e\u001a\u00020\u0005HÆ\u0003ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u000f\u0010\bJ-\u0010\u0010\u001a\b\u0012\u0004\u0012\u00028\u00000\u00002\b\b\u0002\u0010\u0003\u001a\u00028\u00002\b\b\u0002\u0010\u0004\u001a\u00020\u0005HÆ\u0001ø\u0001\u0000¢\u0006\u0004\b\u0011\u0010\u0012J\u0013\u0010\u0013\u001a\u00020\u00142\b\u0010\u0015\u001a\u0004\u0018\u00010\u0002HÖ\u0003J\t\u0010\u0016\u001a\u00020\u0017HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0019HÖ\u0001R\u0019\u0010\u0004\u001a\u00020\u0005ø\u0001\u0000ø\u0001\u0001¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\u0007\u0010\bR\u0013\u0010\u0003\u001a\u00028\u0000¢\u0006\n\n\u0002\u0010\f\u001a\u0004\b\n\u0010\u000b\u0082\u0002\b\n\u0002\b\u0019\n\u0002\b!¨\u0006\u001a"}, d2 = {"Lkotlin/time/TimedValue;", "T", "", "value", TypedValues.TransitionType.S_DURATION, "Lkotlin/time/Duration;", "(Ljava/lang/Object;JLkotlin/jvm/internal/DefaultConstructorMarker;)V", "getDuration-UwyO8pc", "()J", "J", "getValue", "()Ljava/lang/Object;", "Ljava/lang/Object;", "component1", "component2", "component2-UwyO8pc", "copy", "copy-RFiDyg4", "(Ljava/lang/Object;J)Lkotlin/time/TimedValue;", "equals", "", "other", "hashCode", "", "toString", "", "kotlin-stdlib"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final /* data */ class TimedValue<T> {
|
||||
private final long duration;
|
||||
private final T value;
|
||||
|
||||
public /* synthetic */ TimedValue(Object obj, long j, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(obj, j);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* renamed from: copy-RFiDyg4$default, reason: not valid java name */
|
||||
public static /* synthetic */ TimedValue m1832copyRFiDyg4$default(TimedValue timedValue, Object obj, long j, int i, Object obj2) {
|
||||
if ((i & 1) != 0) {
|
||||
obj = timedValue.value;
|
||||
}
|
||||
if ((i & 2) != 0) {
|
||||
j = timedValue.duration;
|
||||
}
|
||||
return timedValue.m1834copyRFiDyg4(obj, j);
|
||||
}
|
||||
|
||||
public final T component1() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/* renamed from: component2-UwyO8pc, reason: not valid java name and from getter */
|
||||
public final long getDuration() {
|
||||
return this.duration;
|
||||
}
|
||||
|
||||
/* renamed from: copy-RFiDyg4, reason: not valid java name */
|
||||
public final TimedValue<T> m1834copyRFiDyg4(T value, long duration) {
|
||||
return new TimedValue<>(value, duration, null);
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof TimedValue)) {
|
||||
return false;
|
||||
}
|
||||
TimedValue timedValue = (TimedValue) other;
|
||||
return Intrinsics.areEqual(this.value, timedValue.value) && Duration.m1680equalsimpl0(this.duration, timedValue.duration);
|
||||
}
|
||||
|
||||
/* renamed from: getDuration-UwyO8pc, reason: not valid java name */
|
||||
public final long m1835getDurationUwyO8pc() {
|
||||
return this.duration;
|
||||
}
|
||||
|
||||
public final T getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
T t = this.value;
|
||||
return ((t == null ? 0 : t.hashCode()) * 31) + Duration.m1703hashCodeimpl(this.duration);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "TimedValue(value=" + this.value + ", duration=" + ((Object) Duration.m1724toStringimpl(this.duration)) + ')';
|
||||
}
|
||||
|
||||
private TimedValue(T t, long j) {
|
||||
this.value = t;
|
||||
this.duration = j;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlin.time.jdk8;
|
||||
|
||||
import java.time.Duration;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.time.DurationKt;
|
||||
import kotlin.time.DurationUnit;
|
||||
|
||||
/* compiled from: DurationConversions.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u001a\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u0087\bø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0003\u0010\u0004\u001a\u0015\u0010\u0005\u001a\u00020\u0002*\u00020\u0001H\u0087\bø\u0001\u0001¢\u0006\u0002\u0010\u0006\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\u0007"}, d2 = {"toJavaDuration", "Ljava/time/Duration;", "Lkotlin/time/Duration;", "toJavaDuration-LRDsOJo", "(J)Ljava/time/Duration;", "toKotlinDuration", "(Ljava/time/Duration;)J", "kotlin-stdlib-jdk8"}, k = 2, mv = {1, 8, 0}, pn = "kotlin.time", xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class DurationConversionsJDK8Kt {
|
||||
private static final long toKotlinDuration(Duration duration) {
|
||||
long seconds;
|
||||
int nano;
|
||||
Intrinsics.checkNotNullParameter(duration, "<this>");
|
||||
seconds = duration.getSeconds();
|
||||
long duration2 = DurationKt.toDuration(seconds, DurationUnit.SECONDS);
|
||||
nano = duration.getNano();
|
||||
return kotlin.time.Duration.m1711plusLRDsOJo(duration2, DurationKt.toDuration(nano, DurationUnit.NANOSECONDS));
|
||||
}
|
||||
|
||||
/* renamed from: toJavaDuration-LRDsOJo, reason: not valid java name */
|
||||
private static final Duration m1836toJavaDurationLRDsOJo(long j) {
|
||||
Duration ofSeconds;
|
||||
ofSeconds = Duration.ofSeconds(kotlin.time.Duration.m1696getInWholeSecondsimpl(j), kotlin.time.Duration.m1698getNanosecondsComponentimpl(j));
|
||||
Intrinsics.checkNotNullExpressionValue(ofSeconds, "toJavaDuration-LRDsOJo");
|
||||
return ofSeconds;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user