Class TIME

java.lang.Object
org.eclipse.mosaic.rti.TIME

public final class TIME extends Object
Constant time units in MOSAIC. The base unit for simulation time is one nano second.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    One hour in simulation time.
    static final long
    One micro-second in simulation time.
    static final long
    One milli-second in simulation time .
    static final long
    One minute in simulation time.
    static final long
    One nano-second in simulation time.
    static final long
    One second in simulation time.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    format(long nanosecond)
    Format a nanosecond to print a time stamp in a readable format.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NANO_SECOND

      public static final long NANO_SECOND
      One nano-second in simulation time.
      See Also:
    • MICRO_SECOND

      public static final long MICRO_SECOND
      One micro-second in simulation time.
      See Also:
    • MILLI_SECOND

      public static final long MILLI_SECOND
      One milli-second in simulation time .
      See Also:
    • SECOND

      public static final long SECOND
      One second in simulation time.
      See Also:
    • MINUTE

      public static final long MINUTE
      One minute in simulation time.
      See Also:
    • HOUR

      public static final long HOUR
      One hour in simulation time.
      See Also:
  • Method Details

    • format

      public static String format(long nanosecond)
      Format a nanosecond to print a time stamp in a readable format.

      E.g. TIME.format(356000010000) -> "356.000,010,000 s"

      Parameters:
      nanosecond - the nanoseconds to format
      Returns:
      the formatted value