-
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 |
💎 $50 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio! Add a bounty • Share on socials
|
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...) |
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: