Class Time


  • public final class Time
    extends java.lang.Object
    This class contains the static time-sources used within the framework.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  Time.TimeSource  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Time()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long absoluteTime()
      Returns a timestamp in milliseconds whose origin is at the Unix Epoch.
      static long time()
      Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Time

        private Time()
    • Method Detail

      • time

        public static long time()
        Returns a timestamp in nanoseconds with an arbitrary origin suitable for timing purposes.

        This contract is non-coincidentally reminiscent of System.nanoTime().

        Returns:
        a time in nanoseconds
      • absoluteTime

        public static long absoluteTime()
        Returns a timestamp in milliseconds whose origin is at the Unix Epoch.

        This contract is non-coincidentally reminiscent of System.currentTimeMillis().

        Returns:
        a Unix timestamp