Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SensorEvent.timestamp to absolute (utc) timestamp?

Tags:

android

I question myself what the timestamp in SensorEvent.timestamp means. Numbers like 3548712982000 occur. It is not plausible for anything: nanoseconds/milliseconds since 1970 etc. Is this maybe some overflow error? It seems as it is different on different devices at the same time!!!

like image 297
Sney Avatar asked Aug 16 '10 22:08

Sney


1 Answers

Just a few seconds after this question on SO I found the answer:

See comment #18 of this issue where it's said that these are nanoseconds since boot (SystemClock.elapsedRealtimeNanos()).

The android documentation definitively needs an update. The doc issue has been recently reported again, feel free to star it.

like image 73
Sney Avatar answered Oct 05 '22 01:10

Sney