SensorEvent timestamp issue for Android

I am currently working on an android application where I need to register all sensor values. I got the sensor event timestamp from "event.timestamp", and I converted this value to a unix timestamp.

long currTimeRelativeToBootMs = SystemClock.uptimeMillis(); long currTimeAbsoluteMs = System.currentTimeMillis(); mStartTimeAbsoluteS = ((double)(currTimeAbsoluteMs - currTimeRelativeToBootMs))/(double)1000.0; ... //timestampRelativeInNs = event.timestamp double temp = mStartTimeAbsoluteS+((double)timestampRelativeInNs)/1000000000.0; 

My application works fine on my HTC phone (Android 2.xx), but it does not work on the new Google Nexus7.

I compared the values โ€‹โ€‹of event.timestamp with different devices. I started using the devices at about the same time, but I had different values. One of the Nexus7 is 4 digits longer .....

SensorEvent-Timestamp (HTC): 175120992123000

SensorEvent-Timestamp (Nex): 1355418999245703000

What could be causing this problem? How can i fix this?

+1
source share

All Articles