Enum SystemTimer

    • Enum Constant Detail

    • Method Detail

      • values

        public static SystemTimer[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SystemTimer c : SystemTimer.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SystemTimer valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • detectHz

        public static long detectHz()
      • adjustTimeoutByDetectedHz

        public static Duration adjustTimeoutByDetectedHz​(Duration timeout)
      • adjustTimeoutByDetectedHz

        public static Duration adjustTimeoutByDetectedHz​(Duration timeout,
                                                         long hz)
      • milliTime

        public long milliTime()
        Description copied from interface: Timer
        Returns the current value of some arbitrary timer, in milliseconds. This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time.
        Specified by:
        milliTime in interface Timer
        Returns:
        The current value of the timer, in milliseconds.