package com.google.android.gms.internal.ads;

import java.util.HashMap;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;

/* JADX INFO: loaded from: classes2.dex */
public final class tc1 implements rj {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final ScheduledExecutorService f16853a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Executor f16854b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final HashMap f16855c = new HashMap();

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public boolean f16856d = false;

    public tc1(ScheduledExecutorService scheduledExecutorService, a30 a30Var) {
        this.f16853a = scheduledExecutorService;
        this.f16854b = a30Var;
    }

    @Override // com.google.android.gms.internal.ads.rj
    public final void G(boolean z10) {
        if (z10) {
            this.f16854b.execute(new na1(this, 4));
        }
    }

    public final synchronized void a(Runnable runnable, long j10, TimeUnit timeUnit) {
        try {
            if (!this.f16856d) {
                m7.n.C.f30468g.b(this);
                this.f16856d = true;
            }
            m7.n.C.f30472k.getClass();
            sc1 sc1Var = new sc1(this, runnable, System.currentTimeMillis() + timeUnit.toMillis(j10));
            ScheduledFuture<?> scheduledFutureSchedule = this.f16853a.schedule(new na1(sc1Var, 3), j10, timeUnit);
            sc1Var.f16403c = scheduledFutureSchedule;
            this.f16855c.put(scheduledFutureSchedule, sc1Var);
        } catch (Throwable th) {
            throw th;
        }
    }
}
