Lines Matching defs:now

395             final long now = event.timestamp;
397 final float timeDeltaMS = (now - then) * 0.000001f;
399 if (now < then
400 || now > then + MAX_FILTER_DELTA_TIME_NANOS
419 mLastFilteredTimestampNanos = now;
439 mAccelerationTimestampNanos = now;
450 addTiltHistoryEntry(now, tiltAngle);
453 if (isFlat(now)) {
455 mFlatTimestampNanos = now;
457 if (isSwinging(now, tiltAngle)) {
459 mSwingTimestampNanos = now;
491 updatePredictedRotation(now, nearestRotation);
498 + ((now - mPredictedRotationTimestampNanos)
515 if (mPredictedRotation < 0 || isPredictedRotationAcceptable(now)) {
528 + ", timeUntilSettledMS=" + remainingMS(now,
530 + ", timeUntilAccelerationDelayExpiredMS=" + remainingMS(now,
532 + ", timeUntilFlatDelayExpiredMS=" + remainingMS(now,
534 + ", timeUntilSwingDelayExpiredMS=" + remainingMS(now,
613 private boolean isPredictedRotationAcceptable(long now) {
615 if (now < mPredictedRotationTimestampNanos + PROPOSAL_SETTLE_TIME_NANOS) {
620 if (now < mFlatTimestampNanos + PROPOSAL_MIN_TIME_SINCE_FLAT_ENDED_NANOS) {
626 if (now < mSwingTimestampNanos + PROPOSAL_MIN_TIME_SINCE_SWING_ENDED_NANOS) {
631 if (now < mAccelerationTimestampNanos
655 private void updatePredictedRotation(long now, int rotation) {
658 mPredictedRotationTimestampNanos = now;
672 private void addTiltHistoryEntry(long now, float tilt) {
674 mTiltHistoryTimestampNanos[mTiltHistoryIndex] = now;
679 private boolean isFlat(long now) {
684 if (mTiltHistoryTimestampNanos[i] + FLAT_TIME_NANOS <= now) {
692 private boolean isSwinging(long now, float tilt) {
694 if (mTiltHistoryTimestampNanos[i] + SWING_TIME_NANOS < now) {
710 private static float remainingMS(long now, long until) {
711 return now >= until ? 0 : (until - now) * 0.000001f;