Package org.testng.util
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 void
computeAndShowTime
(String msg, TimeUtils.Task task) Helper method that can be used to compute the time.static String
formatTimeInLocalOrSpecifiedTimeZone
(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.Task
that represents the task to be executed.
-