Files
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

79 lines
2.0 KiB
Java

package okio;
import java.io.InterruptedIOException;
import java.util.concurrent.TimeUnit;
/* loaded from: classes5.dex */
public class Timeout {
public static final Timeout NONE = new Timeout() { // from class: okio.Timeout.1
@Override // okio.Timeout
public Timeout deadlineNanoTime(long j) {
return this;
}
@Override // okio.Timeout
public void throwIfReached() {
}
@Override // okio.Timeout
public Timeout timeout(long j, TimeUnit timeUnit) {
return this;
}
};
public long deadlineNanoTime;
public boolean hasDeadline;
public long timeoutNanos;
public Timeout clearDeadline() {
this.hasDeadline = false;
return this;
}
public Timeout clearTimeout() {
this.timeoutNanos = 0L;
return this;
}
public Timeout deadlineNanoTime(long j) {
this.hasDeadline = true;
this.deadlineNanoTime = j;
return this;
}
public boolean hasDeadline() {
return this.hasDeadline;
}
public long timeoutNanos() {
return this.timeoutNanos;
}
public Timeout timeout(long j, TimeUnit timeUnit) {
if (j >= 0) {
if (timeUnit == null) {
throw new IllegalArgumentException("unit == null");
}
this.timeoutNanos = timeUnit.toNanos(j);
return this;
}
throw new IllegalArgumentException("timeout < 0: " + j);
}
public long deadlineNanoTime() {
if (this.hasDeadline) {
return this.deadlineNanoTime;
}
throw new IllegalStateException("No deadline");
}
public void throwIfReached() {
if (Thread.interrupted()) {
Thread.currentThread().interrupt();
throw new InterruptedIOException("interrupted");
}
if (this.hasDeadline && this.deadlineNanoTime - System.nanoTime() <= 0) {
throw new InterruptedIOException("deadline reached");
}
}
}