code: public int compare(ByteBuffer o1, ByteBuffer o2)
      {
          if (!o1.hasRemaining() || !o2.hasRemaining())
              return o1.hasRemaining() ? 1 : o2.hasRemaining() ? -1 : 0;
  
          int res = compareTimestampBytes(o1, o2);
          if (res != 0)
              return res;
          return o1.compareTo(o2);
      }
docs: singleton