71 lines
2.0 KiB
Java
71 lines
2.0 KiB
Java
package j0.l.c;
|
|
|
|
import j0.l.c.i;
|
|
import j0.l.d.a;
|
|
import java.util.Objects;
|
|
import java.util.concurrent.TimeUnit;
|
|
import rx.Scheduler;
|
|
import rx.functions.Action0;
|
|
/* compiled from: SchedulePeriodicHelper */
|
|
public final class h implements Action0 {
|
|
public long i;
|
|
public long j;
|
|
public long k;
|
|
public final /* synthetic */ long l;
|
|
public final /* synthetic */ long m;
|
|
public final /* synthetic */ Action0 n;
|
|
public final /* synthetic */ a o;
|
|
public final /* synthetic */ i.a p;
|
|
public final /* synthetic */ Scheduler.Worker q;
|
|
public final /* synthetic */ long r;
|
|
|
|
public h(long j, long j2, Action0 action0, a aVar, i.a aVar2, Scheduler.Worker worker, long j3) {
|
|
this.l = j;
|
|
this.m = j2;
|
|
this.n = action0;
|
|
this.o = aVar;
|
|
this.p = aVar2;
|
|
this.q = worker;
|
|
this.r = j3;
|
|
this.j = j;
|
|
this.k = j2;
|
|
}
|
|
|
|
@Override // rx.functions.Action0
|
|
public void call() {
|
|
long j;
|
|
long j2;
|
|
this.n.call();
|
|
if (!this.o.isUnsubscribed()) {
|
|
i.a aVar = this.p;
|
|
if (aVar != null) {
|
|
j = aVar.a();
|
|
} else {
|
|
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
|
|
Objects.requireNonNull(this.q);
|
|
j = timeUnit.toNanos(System.currentTimeMillis());
|
|
}
|
|
long j3 = i.a;
|
|
long j4 = this.j;
|
|
if (j + j3 >= j4) {
|
|
long j5 = this.r;
|
|
if (j < j4 + j5 + j3) {
|
|
long j6 = this.k;
|
|
long j7 = this.i + 1;
|
|
this.i = j7;
|
|
j2 = (j7 * j5) + j6;
|
|
this.j = j;
|
|
this.o.a(this.q.b(this, j2 - j, TimeUnit.NANOSECONDS));
|
|
}
|
|
}
|
|
long j8 = this.r;
|
|
j2 = j + j8;
|
|
long j9 = this.i + 1;
|
|
this.i = j9;
|
|
this.k = j2 - (j8 * j9);
|
|
this.j = j;
|
|
this.o.a(this.q.b(this, j2 - j, TimeUnit.NANOSECONDS));
|
|
}
|
|
}
|
|
}
|