Sensor data: use monotonic clock.

Part of #1966.
This commit is contained in:
Dennis Guse
2024-12-15 17:57:04 +01:00
parent a2a9132658
commit 333bc6f31b
11 changed files with 33 additions and 25 deletions
@@ -36,7 +36,7 @@ public class BluetoothHandlerRunningSpeedAndCadence implements SensorHandlerInte
@Override
public void handlePayload(SensorManager.SensorDataChangedObserver observer, @NonNull ServiceMeasurementUUID serviceMeasurementUUID, String sensorName, String address, BluetoothGattCharacteristic characteristic) {
Data data = parseRunningSpeedAndCadence(sensorName, characteristic);
observer.onChange(new Raw<>(data));
observer.onChange(new Raw<>(observer.getNow(), data));
}
@VisibleForTesting