package com.google.android.gms.measurement.internal; import android.os.Handler; import com.google.android.gms.common.internal.Preconditions; /* loaded from: classes3.dex */ abstract class zzav { private static volatile Handler zza; private final zzil zzb; private final Runnable zzc; private volatile long zzd; public abstract void zzb(); public final boolean zzc() { return this.zzd != 0; } private final Handler zzd() { Handler handler; if (zza != null) { return zza; } synchronized (zzav.class) { try { if (zza == null) { zza = new com.google.android.gms.internal.measurement.zzcz(this.zzb.zza().getMainLooper()); } handler = zza; } catch (Throwable th) { throw th; } } return handler; } public zzav(zzil zzilVar) { Preconditions.checkNotNull(zzilVar); this.zzb = zzilVar; this.zzc = new zzau(this, zzilVar); } public final void zza() { this.zzd = 0L; zzd().removeCallbacks(this.zzc); } public final void zza(long j) { zza(); if (j >= 0) { this.zzd = this.zzb.zzb().currentTimeMillis(); if (zzd().postDelayed(this.zzc, j)) { return; } this.zzb.zzj().zzg().zza("Failed to schedule delayed post. time", Long.valueOf(j)); } } }