There are several places in the code where we decrement a nanosecond field until a timeout is exceeded or a condition is satisfied. Some of these code snips are wrong, causing timeouts to terminate too soon.
The correct pattern is:
where [nanos] is the timeout expressed in nanoseconds.
The following pattern is NOT correct since it decrements by the
total elapsed time in each iteration and will cause the timeout to
expire too soon.
The ConcurrencyManager, WriteExecutorService and BlockingBuffer use
a different pattern which is also correct. This pattern computes
the elapsed since the last timestamp rather than the elapsed since
the start of the timeout pattern.