Package de.uni_trier.wi2.procake.utils
Class Converter
java.lang.Object
de.uni_trier.wi2.procake.utils.Converter
-
Field Details
-
NANOSECONDS
- See Also:
-
MICROSECONDS
- See Also:
-
MILLISECONDS
- See Also:
-
SECONDS
- See Also:
-
-
Constructor Details
-
Converter
public Converter()
-
-
Method Details
-
convertNs
Converts a time value into the specified time format.- Parameters:
time
- The time in nanoseconds.format
- The format of the time (Nanoseconds, Microseconds, Milliseconds, Seconds).- Returns:
- The time in the specified format.
-
round
public static double round(double value, int places) Rounds a given number to n decimal places using the BigDecimal.ROUND_HALF_UP method.- Parameters:
value
- number to roundplaces
- decimal places- Returns:
- rounded number
-