Max-Mobility / Permobil-SmartDrive-Study

Data Study Collection App for WearOS
2 stars 0 forks source link

Update time recording for sensor data #26

Closed finger563 closed 5 years ago

finger563 commented 5 years ago
long timeInMillis = (new Date()).getTime() 
                    + (sensorEvent.timestamp - System.nanoTime()) / 1000000L;

see this stackoverflow question

finger563 commented 5 years ago

After further review it seems like using SystemClock.elapsedRealtimeNanos() might be better. will investigate

finger563 commented 5 years ago

this also helps with bandwidth / data storage since we no longer need duplicate time entries for each sensor data entry :)