Пример #1
0
 /**
  * Returns the value of this TimeInstant object as a double type in the time unit of the reference
  * time.
  *
  * @return double: the time value of the TimeInstant object as a double type in the time unit
  *     given as a parameter
  */
 public double getTimeAsDouble() {
   return getTimeAsDouble(TimeOperations.getReferenceUnit());
 }
Пример #2
0
 /**
  * Returns the value of this TimeInstant object as a long type in the time unit of the reference
  * time. If the parameter has a coarser granularity than epsilon the returned value will be
  * truncated, so lose precision.
  *
  * @return long: the time value of the TimeInstant object as a long type in the time unit given as
  *     a parameter or Long.MIN_VALUE if conversion would negatively overflow, or Long.MAX_VALUE if
  *     it would positively overflow.
  */
 public long getTimeTruncated() {
   return getTimeTruncated(TimeOperations.getReferenceUnit());
 }
Пример #3
0
 /**
  * Returns the value of this TimeInstant object as a long type in the time unit of the reference
  * time. If the parameter has a coarser granularity than epsilon the returned value will be
  * rounded, so lose precision.
  *
  * @return long: the time value of the TimeInstant object as a long type in the time unit given as
  *     a parameter or Long.MIN_VALUE if conversion would negatively overflow, or Long.MAX_VALUE if
  *     it would positively overflow.
  */
 public long getTimeRounded() {
   return getTimeRounded(TimeOperations.getReferenceUnit());
 }
Пример #4
0
 /**
  * Constructs a TimeInstant object with the given time value in the time unit of the reference
  * time. It represents a time Instant in simulation time.
  *
  * @param timeInReferenceUnit double : The time value of this TimeInstant in the time unit of the
  *     reference time.
  */
 public TimeInstant(double timeInReferenceUnit) {
   this(timeInReferenceUnit, TimeOperations.getReferenceUnit());
 }