Class NanosecondTime

  • All Implemented Interfaces:
    java.lang.Comparable<NanosecondTime>

    public class NanosecondTime
    extends java.lang.Object
    implements java.lang.Comparable<NanosecondTime>
    Simple Nanosecond time-keeper. Combines real-time (epoch) with nanosecond resolution by using BigInteger math. Converted to String this makes for ideal ordered IDs. Makes sure each obtained nanosecond time is unique and monotonically increasing.
    • Constructor Detail

      • NanosecondTime

        public NanosecondTime​(java.math.BigInteger t)
      • NanosecondTime

        public NanosecondTime​(long t)
    • Method Detail

      • getRuntime

        public static long getRuntime()
      • getRuntimeSeconds

        public static double getRuntimeSeconds()
      • getRuntimeMilliseconds

        public static long getRuntimeMilliseconds()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString

        public java.lang.String toString​(int radix)
      • doubleValue

        public double doubleValue()
      • getSeconds

        public double getSeconds()
      • getMilliseconds

        public long getMilliseconds()
      • getNanosecondsFraction

        public long getNanosecondsFraction()
      • getMicrosecondsFraction

        public long getMicrosecondsFraction()