Lines Matching refs:now

589                 final long now = event.timestamp;
591 final float timeDeltaMS = (now - then) * 0.000001f;
593 if (now < then
594 || now > then + MAX_FILTER_DELTA_TIME_NANOS
613 mLastFilteredTimestampNanos = now;
634 mAccelerationTimestampNanos = now;
645 addTiltHistoryEntryLocked(now, tiltAngle);
648 if (isFlatLocked(now)) {
650 mFlatTimestampNanos = now;
652 if (isSwingingLocked(now, tiltAngle)) {
654 mSwingTimestampNanos = now;
697 updatePredictedRotationLocked(now, nearestRotation);
704 + ((now - mPredictedRotationTimestampNanos)
724 if (mPredictedRotation < 0 || isPredictedRotationAcceptableLocked(now)) {
740 + ", timeUntilSettledMS=" + remainingMS(now,
742 + ", timeUntilAccelerationDelayExpiredMS=" + remainingMS(now,
744 + ", timeUntilFlatDelayExpiredMS=" + remainingMS(now,
746 + ", timeUntilSwingDelayExpiredMS=" + remainingMS(now,
748 + ", timeUntilTouchDelayExpiredMS=" + remainingMS(now,
855 private boolean isPredictedRotationAcceptableLocked(long now) {
857 if (now < mPredictedRotationTimestampNanos + PROPOSAL_SETTLE_TIME_NANOS) {
862 if (now < mFlatTimestampNanos + PROPOSAL_MIN_TIME_SINCE_FLAT_ENDED_NANOS) {
868 if (now < mSwingTimestampNanos + PROPOSAL_MIN_TIME_SINCE_SWING_ENDED_NANOS) {
873 if (now < mAccelerationTimestampNanos
879 if (mTouched || now < mTouchEndedTimestampNanos
893 private void updatePredictedRotationLocked(long now, int rotation) {
896 mPredictedRotationTimestampNanos = now;
910 private void addTiltHistoryEntryLocked(long now, float tilt) {
912 mTiltHistoryTimestampNanos[mTiltHistoryIndex] = now;
917 private boolean isFlatLocked(long now) {
922 if (mTiltHistoryTimestampNanos[i] + FLAT_TIME_NANOS <= now) {
930 private boolean isSwingingLocked(long now, float tilt) {
932 if (mTiltHistoryTimestampNanos[i] + SWING_TIME_NANOS < now) {
953 private float remainingMS(long now, long until) {
954 return now >= until ? 0 : (until - now) * 0.000001f;
980 final long now = SystemClock.elapsedRealtimeNanos();
981 scheduleRotationEvaluationIfNecessaryLocked(now);
1025 final long now = SystemClock.elapsedRealtimeNanos();
1026 if (isDesiredRotationAcceptableLocked(now)) {
1030 scheduleRotationEvaluationIfNecessaryLocked(now);
1035 private boolean isDesiredRotationAcceptableLocked(long now) {
1039 if (now < mTouchEndedTimestampNanos + PROPOSAL_MIN_TIME_SINCE_TOUCH_END_NANOS) {
1045 private void scheduleRotationEvaluationIfNecessaryLocked(long now) {
1062 if (now >= timeOfNextPossibleRotationNanos) {
1072 (long) Math.ceil((timeOfNextPossibleRotationNanos - now) * MILLIS_PER_NANO);