5
BlueSky
4y

I love this documentation about System. nanoTime()

Differences in successive calls that span greater than approximately 292 years (2^63 nanoseconds) will not correctly compute elapsed time due to numerical overflow.

Can I confidently say that no service will ever break this limit?

Comments
  • 2
    If we somehow invent 128 bit arch, i don't think so.
  • 1
    Nothing's impossible.
    Toyota.
  • 4
    Has to be documented, otherwise someone will try it using virtual timing and raise a big when it craps out...
  • 4
    We thought the same when we used two digit years.
  • 1
    This is the sort of mindset that caused Y2K. "Oh, two digits is enough for the year!"
Add Comment