package a.b.a.i;

import a.a.a.b;
import android.util.ArrayMap;

public class e {

    /* renamed from: a  reason: collision with root package name */
    private static final String f34a = "DebugTools";
    private static final ArrayMap<String, Long> b = new ArrayMap<>();

    public static void a(String str) {
        long currentTimeMillis = System.currentTimeMillis();
        ArrayMap<String, Long> arrayMap = b;
        synchronized (arrayMap) {
            if (arrayMap.containsKey(str)) {
                Long remove = arrayMap.remove(str);
                if (remove != null) {
                    b.a(f34a, "Event: " + str + " cost " + (currentTimeMillis - remove.longValue()) + " ms.");
                }
            } else {
                b.e(f34a, "Event: " + str + " not exist.");
            }
        }
    }

    public static void b(String str) {
        long currentTimeMillis = System.currentTimeMillis();
        b.a(f34a, "Event: " + str + " start.");
        ArrayMap<String, Long> arrayMap = b;
        synchronized (arrayMap) {
            arrayMap.put(str, Long.valueOf(currentTimeMillis));
        }
    }
}
