package io.fabric.sdk.android.services.common; import android.os.SystemClock; import android.util.Log; /* loaded from: classes2.dex */ public class TimingMetric { private final String a; private final String b; private final boolean c; private long d; private long e; public TimingMetric(String str, String str2) { this.a = str; this.b = str2; this.c = !Log.isLoggable(str2, 2); } private void c() { Log.v(this.b, this.a + ": " + this.e + "ms"); } public synchronized void a() { if (this.c) { return; } this.d = SystemClock.elapsedRealtime(); this.e = 0L; } public synchronized void b() { if (this.c) { return; } if (this.e != 0) { return; } this.e = SystemClock.elapsedRealtime() - this.d; c(); } }