aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/research/Statistics.java
diff options
context:
space:
mode:
authorTadashi G. Takaoka <takaoka@google.com>2013-07-05 17:57:01 +0900
committerTadashi G. Takaoka <takaoka@google.com>2013-07-05 17:57:01 +0900
commit72c2feb57369527b5f0d2b89505f94503978b928 (patch)
treef239b38e5f84376573b568eae39f1bc5364fd46b /java/src/com/android/inputmethod/research/Statistics.java
parentcb13d11c0af95b0621c012be9c01e04a463e40c5 (diff)
downloadlatinime-72c2feb57369527b5f0d2b89505f94503978b928.tar.gz
latinime-72c2feb57369527b5f0d2b89505f94503978b928.tar.xz
latinime-72c2feb57369527b5f0d2b89505f94503978b928.zip
Use TimeUnit instead of DateUtils for readability
Bug: 9550800 Change-Id: I087205530a5dbcff4bf08f48f4aa7068aae93215
Diffstat (limited to 'java/src/com/android/inputmethod/research/Statistics.java')
-rw-r--r--java/src/com/android/inputmethod/research/Statistics.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/research/Statistics.java b/java/src/com/android/inputmethod/research/Statistics.java
index e573ca012..fd323a104 100644
--- a/java/src/com/android/inputmethod/research/Statistics.java
+++ b/java/src/com/android/inputmethod/research/Statistics.java
@@ -21,6 +21,8 @@ import android.util.Log;
import com.android.inputmethod.latin.Constants;
import com.android.inputmethod.latin.define.ProductionFlag;
+import java.util.concurrent.TimeUnit;
+
public class Statistics {
private static final String TAG = Statistics.class.getSimpleName();
private static final boolean DEBUG = false
@@ -102,8 +104,8 @@ public class Statistics {
// To account for the interruptions when the user's attention is directed elsewhere, times
// longer than MIN_TYPING_INTERMISSION are not counted when estimating this statistic.
- public static final int MIN_TYPING_INTERMISSION = 2 * 1000; // in milliseconds
- public static final int MIN_DELETION_INTERMISSION = 10 * 1000; // in milliseconds
+ public static final long MIN_TYPING_INTERMISSION = TimeUnit.SECONDS.toMillis(2);
+ public static final long MIN_DELETION_INTERMISSION = TimeUnit.SECONDS.toMillis(10);
// The last time that a tap was performed
private long mLastTapTime;