RFR:JDK-8141452:Convert between TimeUnit and ChronoUnit
Martin Buchholz
martinrb at google.com
Fri Jan 29 20:53:12 UTC 2016
On Fri, Jan 29, 2016 at 9:37 AM, Stephen Colebourne
<scolebourne at joda.org> wrote:
> In the ideal fix, all methods that take the combination (long,
> TimeUnit) would be supplemented by an override that takes (Duration).
> eg. Future.get(long, TimeUnit) has an additional get(Duration).
> However, this is a lot of work, might be unpopular and would be slower
> for j.u.concurrent use.
Of course, having (long, TimeUnit) argument pairs is a performance
hack, but there's not much demand for an improved API, and I still
hope that someday we'll have proper value types in Java, at which time
adding support for value type durations will be more attractive. So
let's do nothing else for now, unless there's a more urgent compelling
reason?
More information about the core-libs-dev
mailing list