public long updateTimeLeft(boolean forceUpdate) { if (isTicking() || forceUpdate) { long millis = Utils.getTimeNow(); mTimeLeft = mOriginalLength - (millis - mStartTime); } return mTimeLeft; }
public void addTime(long time) { mTimeLeft = mOriginalLength - (Utils.getTimeNow() - mStartTime); if (mTimeLeft < MAX_TIMER_LENGTH - time) { mOriginalLength += time; } }
private void init(long length) { mTimerId = (int) Utils.getTimeNow(); mStartTime = Utils.getTimeNow(); mTimeLeft = mOriginalLength = mSetupLength = length; mLabel = ""; }