discord-jadx/app/src/main/java/j0/l/c/l.java

40 lines
1.1 KiB
Java

package j0.l.c;
import c.q.a.k.a;
import java.util.Objects;
import rx.Scheduler;
import rx.functions.Action0;
/* compiled from: SleepingAction */
public class l implements Action0 {
public final Action0 i;
public final Scheduler.Worker j;
public final long k;
public l(Action0 action0, Scheduler.Worker worker, long j) {
this.i = action0;
this.j = worker;
this.k = j;
}
@Override // rx.functions.Action0
public void call() {
if (!this.j.isUnsubscribed()) {
long j = this.k;
Objects.requireNonNull(this.j);
long currentTimeMillis = j - System.currentTimeMillis();
if (currentTimeMillis > 0) {
try {
Thread.sleep(currentTimeMillis);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
a.J(e);
throw null;
}
}
if (!this.j.isUnsubscribed()) {
this.i.call();
}
}
}
}