Class TimeUtils


  • public class TimeUtils
    extends java.lang.Object
    Everythin related to time stuff
    • Constructor Summary

      Constructors 
      Constructor Description
      TimeUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double durationInMilliseconds​(java.time.Instant start, java.time.Instant end)
      returns the duration in MS between two Time Instants
      static double getTimeInMilliseconds()
      gets the current time in milliseconds
      static long getTimeInNanoseconds()
      returns the current time in Nanoseconds as a long instead of a double
      • Methods inherited from class java.lang.Object

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

      • TimeUtils

        public TimeUtils()
    • Method Detail

      • getTimeInNanoseconds

        public static long getTimeInNanoseconds()
        returns the current time in Nanoseconds as a long instead of a double
        Returns:
        current time in nanoseconds as a long
      • getTimeInMilliseconds

        public static double getTimeInMilliseconds()
        gets the current time in milliseconds
        Returns:
        the current time in ms
      • durationInMilliseconds

        public static double durationInMilliseconds​(java.time.Instant start,
                                                    java.time.Instant end)
        returns the duration in MS between two Time Instants
        Parameters:
        start - Start time
        end - end time
        Returns:
        duration in ms between start and end