DomGarguilo commented on PR #4380: URL: https://github.com/apache/accumulo/pull/4380#issuecomment-2256877958
> I think everything here is technically correct. > > However, I think the purpose of this class is to try to be more expressive, to be able to interact with time durations in a more natural high level way, rather than deal with the arithmetic and comparisons at a low level. I don't think the subtract and compareTo methods are helping at all, and might even make things worse because (at least for me) compareTo can be pretty opaque and I have to remind myself about how the operands relate to the sign. > > A higher level utility method, like `hasElapased(Duration)` can be done more efficiently, so fewer Duration objects are needed to be constructed, and can make things much more readable. A `reset()` method could also be added to make it easy to reuse the timer. > > Also, we don't need both OpTimer and NanoTime, and NanoTime could be renamed. Converted this PR to draft for now. I think these suggestions are good and I can open up a new PR to incorporate them at somepoint. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
