-
Notifications
You must be signed in to change notification settings - Fork 102
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
Duration converters #86
Duration converters #86
Conversation
else FiniteDuration(duration.getSeconds, TimeUnit.SECONDS) | ||
} else { | ||
FiniteDuration( | ||
duration.getSeconds * 1000000000 + duration.getNano, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be a Math.multiplyExact
here though and an overflow check after adding the nano part.
any update on this one? @johanandren maybe it could be integrated into https://github.com/johanandren/timeforscala if not here? |
not sure why/how this fell through the cracks... @johanandren could you update this to add a section to README.md? then we can merge, I think |
* @throws IllegalArgumentException If the given Java Duration is out of bounds of what can be expressed with the | ||
* Scala Durations. | ||
*/ | ||
final def toScala(duration: java.time.Duration): scala.concurrent.duration.Duration = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this would be more useful if it returns a FiniteDuration
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think toScala
should return FiniteDuration
.
I'll get this done soon, have been having sbt issues today though, so couldn't verify my changes. |
6ecc420
to
b9813cb
Compare
the CI failure is #97 — unrelated to the changes in this PR. |
@johanandren would you like me to roll a release...? |
So... here I was looking at the doc - 15 minutes later I discover that the doc its wrong. :-) I'd like to see a release soon if at possible - thanks. |
It isn't urgent for me, but it seems others are interested :) |
@huntc hi Chris! okay I'll roll a release and report here when it's done. probably today |
Hi @SethTisue - thanks so much. Really appreciated. |
0.9.0 (for 2.11 and 2.12 only; skipping 2.13 this time because of #97) is on its way to Maven Central |
Thanks! |
Refs #85