@Test public void unique_time() { final int len = 100000; long[] times = new long[len]; for (int i=0; i < times.length; i++) { times[i] = Revision.newUniqueTime(); } for (int i=0; i < len - 1; i++) { assertThat(times[i]).isLessThan(times[i+1]); } }
public static long newUniqueTime() { return newUniqueTime(currentTimeMillis()); }
Revision implements Comparable<Revision> { public static long newUniqueTime() { return newUniqueTime(currentTimeMillis()); } }
Revision implements Comparable<Revision> { public static long newUniqueTime() { return newUniqueTime(currentTimeMillis()); } Revision(@Nonnull String rev);  Revision();  Revision(long node);  Revision(long timeSeq, long node); }
Revision implements Comparable<Revision> { public static long newUniqueTime() { return newUniqueTime(currentTimeMillis()); } Revision(@Nonnull String rev);  Revision();  Revision(long node);  Revision(long timeSeq, long node); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Revision other); @Override String toString(); static int compareUnsigned(long x, long y); static long newUniqueTime(); static long newUniqueTime(final long currentTimeMillis); static long toLong(@Nonnull String str); @Nonnull static String toString(long val); }
Revision implements Comparable<Revision> { public static long newUniqueTime() { return newUniqueTime(currentTimeMillis()); } Revision(@Nonnull String rev);  Revision();  Revision(long node);  Revision(long timeSeq, long node); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Revision other); @Override String toString(); static int compareUnsigned(long x, long y); static long newUniqueTime(); static long newUniqueTime(final long currentTimeMillis); static long toLong(@Nonnull String str); @Nonnull static String toString(long val); static final Revision MIN_VALUE; static final Revision MAX_VALUE; static final long NODE; final long timeSeq; final long node; }