We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Discovered this playing with scala.concurrent.Duration string parsing in 2.11.8.
scala.concurrent.Duration
scala> import scala.concurrent.duration.Duration import scala.concurrent.duration.Duration scala> Duration("1 day") res1: scala.concurrent.duration.Duration = 1 day scala> Duration("-1 day") res2: scala.concurrent.duration.Duration = -86399999999999 nanoseconds
The negative value is exactly 1 nanosecond short of a day. Also, because it's expressed in nanoseconds, it's not nearly as readable.
The text was updated successfully, but these errors were encountered:
Imported From: https://issues.scala-lang.org/browse/SI-9949?orig=1 Reporter: Leonid Meyerguz (lmeyerguz-at-gmail.com) Affected Versions: 2.11.8
Sorry, something went wrong.
Fix rounding errors in creation of Durations.
2a2f588
Use round instead of manually trying to convert to a Long. Fixes scala/bug#9949 and scala/bug#10320
No branches or pull requests
Discovered this playing with
scala.concurrent.Duration
string parsing in 2.11.8.The negative value is exactly 1 nanosecond short of a day. Also, because it's expressed in nanoseconds, it's not nearly as readable.
The text was updated successfully, but these errors were encountered: