keith-turner commented on PR #4364: URL: https://github.com/apache/accumulo/pull/4364#issuecomment-1992544578
> can not add Comparable as its not safe to compare nano times Actually we could add a compareTo method that may be safe by doing the following. However I don't think I will add that now unless there is a need. ```java @Override public int compareTo(NanoTime other) { long now = System.nanoTime(); // all operations w/ nanoTimes must compute elapsed times first long elapsed1 = now - nanosSinceAO; long elapsed2 = now - other.nanosSinceAO; return Long.compare(elapsed1, elapsed2); } ``` -- 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: notifications-unsubscr...@accumulo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org