Class Converter

java.lang.Object
de.uni_trier.wi2.procake.utils.Converter

public class Converter extends Object
  • Field Details

  • Constructor Details

    • Converter

      public Converter()
  • Method Details

    • convertNs

      public static long convertNs(long time, String format)
      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 round
      places - decimal places
      Returns:
      rounded number