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

FineTime MAL stored as long (picosecond resolution) #1

Open
CesarCoelho opened this issue Jan 15, 2015 · 0 comments
Open

FineTime MAL stored as long (picosecond resolution) #1

CesarCoelho opened this issue Jan 15, 2015 · 0 comments
Labels
Proposed R3 Proposed for R3 of Blue Book

Comments

@CesarCoelho
Copy link

FineTime definition:
"The FineTime structure is used to store high-resolution absolute time attributes. It represents an absolute date and time to picosecond resolution."

According to the Java MAL API book (page 77):
MAL::Attribute = FineTime -> Wrapped Java type = long

An unsigned long can hold a maximum value of:
2^64 = 18446744073709551616 (picoseconds)

Which would correspond to the following maximum seconds:
18446744. 073 709 551 616 (seconds)

Which in days is:
18446744 sec = 5124 hours = 213.5 days

This means that with the current FineTime attribute picosecond resolution, one can only hold an absolute date and time on a range of 214 days!!

Suggested Solutions:
1 Store it as a 128 bit variable:
2^128 picoseconds = 1.079×10^19 years
(for comparison: Age of the universe = (13.798±0.037)×10^9 years)

2 Change the definition from picoseconds to nanoseconds:
2^64 nanoseconds = 584.9 years

Extra info (from ScienceDaily):
"The Galileo passive hydrogen masers will keep time with an accuracy of around one nanosecond (one one-thousand-millionth of a second) in 24 hours – equivalent to losing or gaining a second in 2.7 million years."


Sam's Answer: "After discussing it here we think nanosecond resolution should be plenty. That would officially mean a change to the MAL Blue book but that won’t be happening for a while."

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

No branches or pull requests

2 participants