Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Precision of the Instant #12

Open
luolong opened this issue Jan 9, 2013 · 0 comments
Open

Precision of the Instant #12

luolong opened this issue Jan 9, 2013 · 0 comments

Comments

@luolong
Copy link
Owner

luolong commented Jan 9, 2013

Right at the moment, the Instant has internal representation as a single Integer specifying number of milliseconds since epoch.

That gives us roughly the full range of 1.8447e+19 milliseconds to operate on.

This is total of 2.1350e+11 days or roughly 5.8455e+08 years, which is although significantly less than the range for Date, still a lot of room in terms of time we can express with an Instant.

Another question is that if milliseconds is quite enough precision to use for an Instant, which is after all meant to be used mostly for timestamps and measuring/identifying precise moments of occurrence of events.

Todays hardware can make quite a lot of operations within a millisecond just on a single processor. So this means that for accurate measurement of time or recording of events, the milliseconds is no longer adequate.

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

No branches or pull requests

1 participant