Package com.sun.javatest.util
Class FormattingUtils
java.lang.Object
com.sun.javatest.util.FormattingUtils
Helper methods related to data formatting.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
formattedDuration
(long durationSeconds) Converts the given duration in seconds to a more readable string representation: for example "2 days 1 minute 4 seconds".
-
Constructor Details
-
FormattingUtils
public FormattingUtils()
-
-
Method Details
-
formattedDuration
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"
-