Class HumanReadableTimeUtils

java.lang.Object
org.antublue.test.engine.internal.util.HumanReadableTimeUtils

public final class HumanReadableTimeUtils extends Object
Class to create a human-readable time from a duration
  • Method Details

    • toHumanReadable

      public static String toHumanReadable(long nanoseconds)
      Method to convert a duration into a human-readable time
      Parameters:
      nanoseconds - nanoseconds
      Returns:
      the return value
    • toHumanReadable

      public static String toHumanReadable(long nanoseconds, boolean useShortFormat)
      Method to convert a duration into a human-readable time
      Parameters:
      nanoseconds - nanoseconds
      useShortFormat - useShortFormat
      Returns:
      the return value
    • now

      public static String now()
      Method to get the current time as a String
      Returns:
      the return value
    • toTimingUnit

      public static String toTimingUnit(long nanoseconds, String timingUnit)
      Method to convert nanoseconds to specific timing unit String
      Parameters:
      nanoseconds - nanoseconds
      timingUnit - timingUnit
      Returns:
      a String representing the converted nanoseconds value