package o; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import o.AbstractC13173fSu; /* renamed from: o.fWs, reason: case insensitive filesystem */ /* loaded from: classes6.dex */ public final class C13310fWs extends AbstractC13163fSk { private long a; private long b; private long c; private AbstractC13173fSu d; private long e; private TimeUnit f; public C13310fWs(long j, long j2, long j3, long j4, TimeUnit timeUnit, AbstractC13173fSu abstractC13173fSu) { this.b = j3; this.e = j4; this.f = timeUnit; this.d = abstractC13173fSu; this.a = j; this.c = j2; } @Override // o.AbstractC13163fSk public final void subscribeActual(InterfaceC13174fSv interfaceC13174fSv) { HBt hBt = new HBt(interfaceC13174fSv, this.a, this.c); interfaceC13174fSv.onSubscribe(hBt); AbstractC13173fSu abstractC13173fSu = this.d; if (abstractC13173fSu instanceof fYE) { AbstractC13173fSu.Sts c = abstractC13173fSu.c(); EnumC13192fTf.a(hBt, c); c.a(hBt, this.b, this.e, this.f); return; } EnumC13192fTf.a(hBt, abstractC13173fSu.d(hBt, this.b, this.e, this.f)); } /* renamed from: o.fWs$HBt */ /* loaded from: classes6.dex */ static final class HBt extends AtomicReference implements fSJ, Runnable { private long b; private long c; private InterfaceC13174fSv d; HBt(InterfaceC13174fSv interfaceC13174fSv, long j, long j2) { this.d = interfaceC13174fSv; this.b = j; this.c = j2; } @Override // o.fSJ public final void dispose() { EnumC13192fTf.e(this); } @Override // o.fSJ public final boolean isDisposed() { return get() == EnumC13192fTf.DISPOSED; } @Override // java.lang.Runnable public final void run() { if (isDisposed()) { return; } long j = this.b; this.d.onNext(Long.valueOf(j)); if (j != this.c) { this.b = j + 1; return; } if (!isDisposed()) { this.d.onComplete(); } EnumC13192fTf.e(this); } } }