mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Changing from currentTimeMillis to nanoTime, we need precision on Android 2.3
This commit is contained in:
parent
7d0cc5837d
commit
ca1a322c76
@ -223,7 +223,7 @@ public class AccelListener extends Plugin implements SensorEventListener {
|
|||||||
if (this.accuracy >= SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM) {
|
if (this.accuracy >= SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM) {
|
||||||
|
|
||||||
// Save time that event was received
|
// Save time that event was received
|
||||||
this.timestamp = System.currentTimeMillis();
|
this.timestamp = System.nanoTime();
|
||||||
this.x = event.values[0];
|
this.x = event.values[0];
|
||||||
this.y = event.values[1];
|
this.y = event.values[1];
|
||||||
this.z = event.values[2];
|
this.z = event.values[2];
|
||||||
|
Loading…
Reference in New Issue
Block a user