Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why you did not use SensorEvent.timestamp? #77

Open
ftabashir opened this issue Jun 17, 2020 · 1 comment
Open

Why you did not use SensorEvent.timestamp? #77

ftabashir opened this issue Jun 17, 2020 · 1 comment

Comments

@ftabashir
Copy link

In KalmanLocationService.onSensorChanged elapsed nanos was retrieved like this:

long now = android.os.SystemClock.elapsedRealtimeNanos();

While we have it already in SensorEvent.timestamp.

Is there any issue in using SensorEvent.timestamp which you avoid to use?

@Lezh1k
Copy link
Collaborator

Lezh1k commented Jun 18, 2020

Yes. I'm not sure why, but seems, like those events use different clock sources.
I wanted to be sure, that we use same clock source for each event type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants