package com.ubt.jimu.user.view.picker; import java.util.Timer; import java.util.TimerTask; /* loaded from: classes2.dex */ final class MTimer extends TimerTask { int a = Integer.MAX_VALUE; int b = 0; final int c; final Timer d; final LoopView e; MTimer(LoopView loopView, int i, Timer timer) { this.e = loopView; this.c = i; this.d = timer; } @Override // java.util.TimerTask, java.lang.Runnable public final void run() { if (this.a == Integer.MAX_VALUE) { int i = this.c; if (i < 0) { float f = -i; LoopView loopView = this.e; float f2 = loopView.v; int i2 = loopView.q; if (f > (i2 * f2) / 2.0f) { this.a = (int) (((-f2) * i2) - i); } else { this.a = -i; } } else { float f3 = i; LoopView loopView2 = this.e; float f4 = loopView2.v; int i3 = loopView2.q; if (f3 > (i3 * f4) / 2.0f) { this.a = (int) ((f4 * i3) - i); } else { this.a = -i; } } } int i4 = this.a; this.b = (int) (i4 * 0.1f); if (this.b == 0) { if (i4 < 0) { this.b = -1; } else { this.b = 1; } } if (Math.abs(this.a) <= 0) { this.d.cancel(); this.e.c.sendEmptyMessage(3000); } else { LoopView loopView3 = this.e; loopView3.b += this.b; loopView3.c.sendEmptyMessage(1000); this.a -= this.b; } } }