Lines Matching refs:now

411                 final long now = event.timestamp;
413 final float timeDeltaMS = (now - then) * 0.000001f;
415 if (now < then
416 || now > then + MAX_FILTER_DELTA_TIME_NANOS
435 mLastFilteredTimestampNanos = now;
456 mAccelerationTimestampNanos = now;
467 addTiltHistoryEntryLocked(now, tiltAngle);
470 if (isFlatLocked(now)) {
472 mFlatTimestampNanos = now;
474 if (isSwingingLocked(now, tiltAngle)) {
476 mSwingTimestampNanos = now;
508 updatePredictedRotationLocked(now, nearestRotation);
515 + ((now - mPredictedRotationTimestampNanos)
532 if (mPredictedRotation < 0 || isPredictedRotationAcceptableLocked(now)) {
546 + ", timeUntilSettledMS=" + remainingMS(now,
548 + ", timeUntilAccelerationDelayExpiredMS=" + remainingMS(now,
550 + ", timeUntilFlatDelayExpiredMS=" + remainingMS(now,
552 + ", timeUntilSwingDelayExpiredMS=" + remainingMS(now,
632 private boolean isPredictedRotationAcceptableLocked(long now) {
634 if (now < mPredictedRotationTimestampNanos + PROPOSAL_SETTLE_TIME_NANOS) {
639 if (now < mFlatTimestampNanos + PROPOSAL_MIN_TIME_SINCE_FLAT_ENDED_NANOS) {
645 if (now < mSwingTimestampNanos + PROPOSAL_MIN_TIME_SINCE_SWING_ENDED_NANOS) {
650 if (now < mAccelerationTimestampNanos
674 private void updatePredictedRotationLocked(long now, int rotation) {
677 mPredictedRotationTimestampNanos = now;
691 private void addTiltHistoryEntryLocked(long now, float tilt) {
693 mTiltHistoryTimestampNanos[mTiltHistoryIndex] = now;
698 private boolean isFlatLocked(long now) {
703 if (mTiltHistoryTimestampNanos[i] + FLAT_TIME_NANOS <= now) {
711 private boolean isSwingingLocked(long now, float tilt) {
713 if (mTiltHistoryTimestampNanos[i] + SWING_TIME_NANOS < now) {
729 private float remainingMS(long now, long until) {
730 return now >= until ? 0 : (until - now) * 0.000001f;