From d2c1159c5ca7a7c0c0403a31ad2f3a556d1d66ad Mon Sep 17 00:00:00 2001 From: Anthony Stange Date: Mon, 16 Mar 2020 17:31:03 -0400 Subject: [PATCH] Clarify timestamp definition for SensorEvent Bug: 149914062 Test: presubmits Change-Id: Ib686100496ce80febba6258bbab57f95ddb3386c --- core/java/android/hardware/SensorEvent.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/java/android/hardware/SensorEvent.java b/core/java/android/hardware/SensorEvent.java index 5fbf0da8b5a5c..9906331be4978 100644 --- a/core/java/android/hardware/SensorEvent.java +++ b/core/java/android/hardware/SensorEvent.java @@ -657,7 +657,9 @@ public class SensorEvent { public int accuracy; /** - * The time in nanosecond at which the event happened + * The time in nanoseconds at which the event happened. For a given sensor, + * each new sensor event should be monotonically increasing using the same + * time base as {@link android.os.SystemClock#elapsedRealtimeNanos()}. */ public long timestamp;