package IMuAHx_6.KQgRr5e_0.KQgRr5e_0;

import android.os.SystemClock;
/* compiled from: SpeedCalculator.java */
/* loaded from: classes.dex */
public class IMuAHx_6 {

    /* renamed from: IFxWkV_5  reason: collision with root package name */
    public long f3038IFxWkV_5;
    public long KQgRr5e_0;

    /* renamed from: Mqv2r_3  reason: collision with root package name */
    public long f3039Mqv2r_3;
    public long PGPF6hQ_2;
    public long QxJ9d_1;

    /* renamed from: X6FRs_4  reason: collision with root package name */
    public long f3040X6FRs_4;

    public synchronized void KQgRr5e_0(long j) {
        if (this.KQgRr5e_0 == 0) {
            long Mqv2r_32 = Mqv2r_3();
            this.KQgRr5e_0 = Mqv2r_32;
            this.f3039Mqv2r_3 = Mqv2r_32;
        }
        this.QxJ9d_1 += j;
        this.f3038IFxWkV_5 += j;
    }

    public long Mqv2r_3() {
        return SystemClock.uptimeMillis();
    }

    public long PGPF6hQ_2() {
        m16QxJ9d_1();
        return this.PGPF6hQ_2;
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public synchronized void m16QxJ9d_1() {
        long Mqv2r_32 = Mqv2r_3();
        long j = this.QxJ9d_1;
        long max = Math.max(1L, Mqv2r_32 - this.KQgRr5e_0);
        this.QxJ9d_1 = 0L;
        this.KQgRr5e_0 = Mqv2r_32;
        this.PGPF6hQ_2 = (((float) j) / ((float) max)) * 1000.0f;
    }

    /* renamed from: PGPF6hQ_2  reason: collision with other method in class */
    public String m14PGPF6hQ_2() {
        return KQgRr5e_0(QxJ9d_1(), true);
    }

    public synchronized long KQgRr5e_0() {
        long Mqv2r_32 = Mqv2r_3() - this.KQgRr5e_0;
        if (Mqv2r_32 < 1000 && this.PGPF6hQ_2 != 0) {
            return this.PGPF6hQ_2;
        } else if (this.PGPF6hQ_2 != 0 || Mqv2r_32 >= 500) {
            return PGPF6hQ_2();
        } else {
            return 0L;
        }
    }

    public synchronized long QxJ9d_1() {
        return (((float) this.f3038IFxWkV_5) / ((float) Math.max(1L, (this.f3040X6FRs_4 == 0 ? Mqv2r_3() : this.f3040X6FRs_4) - this.f3039Mqv2r_3))) * 1000.0f;
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public synchronized void m13KQgRr5e_0() {
        this.f3040X6FRs_4 = Mqv2r_3();
    }

    /* renamed from: QxJ9d_1  reason: collision with other method in class */
    public String m15QxJ9d_1() {
        return KQgRr5e_0(KQgRr5e_0(), true);
    }

    /* renamed from: KQgRr5e_0  reason: collision with other method in class */
    public String m12KQgRr5e_0() {
        return m14PGPF6hQ_2();
    }

    public static String KQgRr5e_0(long j, boolean z) {
        return IMuAHx_6.KQgRr5e_0.KQgRr5e_0.XnFJ5_9.PGPF6hQ_2.KQgRr5e_0(j, z) + "/s";
    }
}
