On Wed, 1 May 2024 17:21:20 GMT, Naoto Sato <na...@openjdk.org> wrote:
>> A new method on Instant to return the duration `until` another Instant is >> suggested per the following discussion thread: >> >> https://mail.openjdk.org/pipermail/core-libs-dev/2024-April/122131.html >> >> A CSR has also been drafted. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing CSR reviews @kluever Your comment isn't visible yet, there's a checkbox to accept OpenJDK terms. It would be good to know what you've commented. My reservation about `minus(Instant)` is that all of the current `minus(...)` methods return an `Instant` as do the `plus(...)` methods. Adding a `minus` method that returns `Duration` adds a bit of fuzziness to the plus and minus method uses. A similar concern could be raised about adding `Duration until(Instant)` as there is already a `until(Temporarl, TemporalUnit)` method. But there is smaller opportunity to mix them up. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19007#issuecomment-2090693079