-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
add conversion to FiniteDuration
to zio.duration
#8797
Comments
I think |
/bounty $50 |
|
Isnt that a regression? I mean what would it return for the infinite case? |
@NavidJalali The thing is, there is no infinite case. It's faked. It used to exist back when we used Scala duration but (Unless I'm missing something...) |
💡 @Adriani277 submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
/attempt #8797 Options |
🎉🎈 @Adriani277 has been awarded $50! 🎈🎊 |
💡 @asr2003 submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
@asr2003: You've been awarded a $50 bounty by ZIO! 👉 Complete your Algora onboarding to collect the bounty. |
🎉🎈 @asr2003 has been awarded $50! 🎈🎊 |
Unfortunatelly we still have a lot of akka in our codebase.
akka always requires
scala.concurrent.duration.FiniteDuration
instances, however I always havezio._
imported.There's already a
.asScala
conversion, however that one gives me just the supertypescala.concurrent.duration.Duration
when I need the subtype.could we maybe have a
.asScalaFinite
or.asScalaFiniteUnsafe
that would return aFiniteDuration
for everything that is not infinity?https://github.com/zio/zio/blob/series/2.x/core/shared/src/main/scala/zio/Duration.scala#L176-L181
Thanks!
The text was updated successfully, but these errors were encountered: