Class TimeUtils
java.lang.Object
org.testng.util.TimeUtils
A Utility class that deals with time.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcomputeAndShowTime(String msg, TimeUtils.Task task) Helper method that can be used to compute the time.static StringformatTimeInLocalOrSpecifiedTimeZone(long timeInMilliSeconds, String format)
-
Method Details
-
formatTimeInLocalOrSpecifiedTimeZone
- Parameters:
timeInMilliSeconds- - The time in millisecondsformat- - A format that can be used bySimpleDateFormat- Returns:
- - A formatted string representation of the time in the timezone as obtained via
RuntimeBehavior.getTimeZone()
-
computeAndShowTime
Helper method that can be used to compute the time.- Parameters:
msg- - A user friendly message to be shown in the logs.task- - ATimeUtils.Taskthat represents the task to be executed.
-