Skip to content

Commit 9bbdd13

Browse files
DzmitryFomchyngithub-actions[bot]
authored andcommitted
Adasis monotomic time fix (#10176) (#10314)
* Move MonotonicTimestampProvider to base module * Default timestamp for datainputs types * Fix timestamp for the ADASIS weather GitOrigin-RevId: f5ef514e965788a24b597be1ccad8db6ed714b0a
1 parent b08c02b commit 9bbdd13

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.mapbox.navigation.base.internal.time
2+
3+
import android.os.SystemClock
4+
import androidx.annotation.RestrictTo
5+
6+
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
7+
object MonotonicTimestampProvider {
8+
9+
/**
10+
* NN requires monotonicTimestampNanoseconds in sensor data to be based
11+
* on the same source as [com.mapbox.navigator.FixLocation.monotonicTimestampNanoseconds],
12+
* which is in turn based on [Location#getElapsedRealtimeNanos()](https://developer.android.com/reference/android/location/Location#getElapsedRealtimeNanos()),
13+
*
14+
* @see [com.mapbox.navigation.core.navigator.toFixLocation]
15+
*/
16+
fun getLocationBasedMonotonicTimestamp() = SystemClock.elapsedRealtimeNanos()
17+
}

0 commit comments

Comments
 (0)