Lines Matching refs:now

456                 final long now = event.timestamp;
458 final float timeDeltaMS = (now - then) * 0.000001f;
460 if (now < then
461 || now > then + MAX_FILTER_DELTA_TIME_NANOS
480 mLastFilteredTimestampNanos = now;
501 mAccelerationTimestampNanos = now;
512 addTiltHistoryEntryLocked(now, tiltAngle);
515 if (isFlatLocked(now)) {
517 mFlatTimestampNanos = now;
519 if (isSwingingLocked(now, tiltAngle)) {
521 mSwingTimestampNanos = now;
564 updatePredictedRotationLocked(now, nearestRotation);
571 + ((now - mPredictedRotationTimestampNanos)
591 if (mPredictedRotation < 0 || isPredictedRotationAcceptableLocked(now)) {
606 + ", timeUntilSettledMS=" + remainingMS(now,
608 + ", timeUntilAccelerationDelayExpiredMS=" + remainingMS(now,
610 + ", timeUntilFlatDelayExpiredMS=" + remainingMS(now,
612 + ", timeUntilSwingDelayExpiredMS=" + remainingMS(now,
692 private boolean isPredictedRotationAcceptableLocked(long now) {
694 if (now < mPredictedRotationTimestampNanos + PROPOSAL_SETTLE_TIME_NANOS) {
699 if (now < mFlatTimestampNanos + PROPOSAL_MIN_TIME_SINCE_FLAT_ENDED_NANOS) {
705 if (now < mSwingTimestampNanos + PROPOSAL_MIN_TIME_SINCE_SWING_ENDED_NANOS) {
710 if (now < mAccelerationTimestampNanos
738 private void updatePredictedRotationLocked(long now, int rotation) {
741 mPredictedRotationTimestampNanos = now;
755 private void addTiltHistoryEntryLocked(long now, float tilt) {
757 mTiltHistoryTimestampNanos[mTiltHistoryIndex] = now;
762 private boolean isFlatLocked(long now) {
767 if (mTiltHistoryTimestampNanos[i] + FLAT_TIME_NANOS <= now) {
775 private boolean isSwingingLocked(long now, float tilt) {
777 if (mTiltHistoryTimestampNanos[i] + SWING_TIME_NANOS < now) {
798 private float remainingMS(long now, long until) {
799 return now >= until ? 0 : (until - now) * 0.000001f;