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

convert timestamp to double, improves precision #182

Merged
merged 2 commits into from May 12, 2021

Conversation

ifsnop
Copy link
Contributor

@ifsnop ifsnop commented May 8, 2021

Instead of seconds*1000+usec/1000 as timestamp, use double representation as seconds with decimals.

No conversion has to be done when parsing output (timestamp can be compared directly to time of day dataitem, for example).

Also, there is no loss of precision when transforming final format to timestamp.

Altought this works for me, I don't know if this PR will break things, please review with care.

@ifsnop ifsnop mentioned this pull request May 8, 2021
@dsalantic dsalantic merged commit 5d773fa into CroatiaControlLtd:master May 12, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants