package h5; import java.io.InterruptedIOException; import java.util.concurrent.TimeUnit; /* loaded from: classes2.dex */ public class p0 { /* renamed from: d, reason: collision with root package name */ public static final p0 f10264d = new a(); /* renamed from: a, reason: collision with root package name */ private boolean f10265a; /* renamed from: b, reason: collision with root package name */ private long f10266b; /* renamed from: c, reason: collision with root package name */ private long f10267c; class a extends p0 { a() { } @Override // h5.p0 public p0 d(long j10) { return this; } @Override // h5.p0 public void f() { } @Override // h5.p0 public p0 g(long j10, TimeUnit timeUnit) { return this; } } public p0 a() { this.f10265a = false; return this; } public p0 b() { this.f10267c = 0L; return this; } public long c() { if (this.f10265a) { return this.f10266b; } throw new IllegalStateException("No deadline"); } public p0 d(long j10) { this.f10265a = true; this.f10266b = j10; return this; } public boolean e() { return this.f10265a; } public void f() { if (Thread.interrupted()) { throw new InterruptedIOException("thread interrupted"); } if (this.f10265a && this.f10266b - System.nanoTime() <= 0) { throw new InterruptedIOException("deadline reached"); } } public p0 g(long j10, TimeUnit timeUnit) { if (j10 >= 0) { if (timeUnit == null) { throw new IllegalArgumentException("unit == null"); } this.f10267c = timeUnit.toNanos(j10); return this; } throw new IllegalArgumentException("timeout < 0: " + j10); } public long h() { return this.f10267c; } }