package com.ironsource; import java.util.Timer; import java.util.TimerTask; /* loaded from: classes2.dex */ public abstract class f { private Object a = new Object(); private Timer b; protected long c; protected T d; public class a extends TimerTask { public a() { } @Override // java.util.TimerTask, java.lang.Runnable public void run() { f.this.b(); } } public f() { } public f(long j) { this.c = j; } public void a(T t) { if (a() || t == null) { return; } this.d = t; c(); synchronized (this.a) { Timer timer = new Timer(); this.b = timer; timer.schedule(new a(), this.c); } } public boolean a() { return this.c <= 0; } public abstract void b(); public void c() { synchronized (this.a) { try { Timer timer = this.b; if (timer != null) { timer.cancel(); this.b = null; } } catch (Throwable th) { throw th; } } } public void d() { this.d = null; } }