On Wed, 14 Jun 2023 17:29:06 GMT, Roger Riggs <[email protected]> wrote:
>> OK. Here is a version that uses a new class "Deadline" instead of "Instant". > > Wrapping the Instant is safe/fine. > However, it could quite a bit simpler (it seems) to just use the raw `long` > nanoTime values. > Though milliseconds or seconds would be sufficient for the timeouts. > The complexity of the volatile read and needing to reset the nanoSource could > be avoided. Working with Instant (now Deadline) and Duration is much safer and easier than working with longs representing nano time, especially when you have a sorted list of deadlines. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14450#discussion_r1229955654
