Class FormattingUtils

java.lang.Object
com.sun.javatest.util.FormattingUtils

public class FormattingUtils extends Object
Helper methods related to data formatting.
  • Constructor Details

    • FormattingUtils

      public FormattingUtils()
  • Method Details

    • formattedDuration

      public static String formattedDuration(long durationSeconds)
      Converts the given duration in seconds to a more readable string representation: for example "2 days 1 minute 4 seconds". This method doesn't generates weeks, months or years, only days which is expected to be sufficient for printing total time taken by even a long test run.
      Parameters:
      durationSeconds - the seconds to convert to human-readable form
      Returns:
      formatted representation, i.e. "1 hour 53 seconds"