Package org.openjdk.jmh.runner.options
Class TimeValue
java.lang.Object
org.openjdk.jmh.runner.options.TimeValue
- All Implemented Interfaces:
Serializable
A generic time scalar.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
static TimeValue
days
(long v) boolean
static TimeValue
fromString
(String timeString) long
getTime()
int
hashCode()
static TimeValue
hours
(long v) static TimeValue
microseconds
(long v) static TimeValue
milliseconds
(long v) static TimeValue
minutes
(long v) static TimeValue
nanoseconds
(long v) static TimeValue
seconds
(long v) void
sleep()
toString()
static String
tuToString
(TimeUnit timeUnit) Converts timeunit to stringly representation.static TimeValue
Parses time value from a string representation.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
NONE
-
time
private final long time -
timeUnit
-
-
Constructor Details
-
TimeValue
-
-
Method Details
-
days
-
hours
-
microseconds
-
milliseconds
-
minutes
-
nanoseconds
-
seconds
-
getTime
public long getTime() -
convertTo
-
getTimeUnit
-
hashCode
public int hashCode() -
equals
-
toString
-
tuToString
Converts timeunit to stringly representation.- Parameters:
timeUnit
- timeunit to convert- Returns:
- string representation
-
valueOf
Parses time value from a string representation. This method is called by joptsimple to resolve string values.- Parameters:
timeString
- string representation of a time value- Returns:
- TimeValue value
-
fromString
-
sleep
- Throws:
InterruptedException
-