android Programming Glossary: mnexttime
android CountDownTimer - additional milliseconds delay between ticks http://stackoverflow.com/questions/12762272/android-countdowntimer-additional-milliseconds-delay-between-ticks make a few changes Add a new class variable private long mNextTime Change start public synchronized final MoreAccurateTimer start.. start if mMillisInFuture 0 onFinish return this mNextTime SystemClock.uptimeMillis mStopTimeInFuture mNextTime mMillisInFuture.. this mNextTime SystemClock.uptimeMillis mStopTimeInFuture mNextTime mMillisInFuture mNextTime mCountdownInterval mHandler.sendMessageAtTime..
android CountDownTimer - additional milliseconds delay between ticks http://stackoverflow.com/questions/12762272/android-countdowntimer-additional-milliseconds-delay-between-ticks the class a unique name. I called mine MoreAccurateTimer. Now make a few changes Add a new class variable private long mNextTime Change start public synchronized final MoreAccurateTimer start if mMillisInFuture 0 onFinish return this mNextTime SystemClock.uptimeMillis.. mNextTime Change start public synchronized final MoreAccurateTimer start if mMillisInFuture 0 onFinish return this mNextTime SystemClock.uptimeMillis mStopTimeInFuture mNextTime mMillisInFuture mNextTime mCountdownInterval mHandler.sendMessageAtTime.. MoreAccurateTimer start if mMillisInFuture 0 onFinish return this mNextTime SystemClock.uptimeMillis mStopTimeInFuture mNextTime mMillisInFuture mNextTime mCountdownInterval mHandler.sendMessageAtTime mHandler.obtainMessage MSG mNextTime return this..
|