W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2016

Re: [sensors] Does SensorReading always need a timeStamp ?

From: Rijubrata Bhaumik via GitHub <sysbot+gh@w3.org>
Date: Wed, 11 May 2016 08:20:54 +0000
To: public-device-apis@w3.org
Message-ID: <issue_comment.created-218393255-1462954853-sysbot+gh@w3.org>
Yes there is some 
[confusion](https://code.google.com/p/android/issues/detail?id=7981) 
in the docs, maybe I should use the timestamps [`this 
way`](http://stackoverflow.com/questions/5500765/accelerometer-sensorevent-timestamp/9333605#9333605)

``` java
long timeInMillis = System.currentTimeMillis()
                             + ((event.timestamp 
                             -  
SystemClock.elapsedRealtimeNanos())/1000000L);
```



-- 
GitHub Notification of comment by riju
Please view or discuss this issue at 
https://github.com/w3c/sensors/issues/105#issuecomment-218393255 using
 your GitHub account
Received on Wednesday, 11 May 2016 08:22:50 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 14:54:08 UTC