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 TypeMethodDescriptionlongstatic TimeValuedays(long v) booleanstatic TimeValuefromString(String timeString) longgetTime()inthashCode()static TimeValuehours(long v) static TimeValuemicroseconds(long v) static TimeValuemilliseconds(long v) static TimeValueminutes(long v) static TimeValuenanoseconds(long v) static TimeValueseconds(long v) voidsleep()toString()static StringtuToString(TimeUnit timeUnit) Converts timeunit to stringly representation.static TimeValueParses time value from a string representation.
-
Field Details
-
NONE
-
-
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
-